Research
Rethinking PDF for Modern Hardware
HOPF (Hardware-Optimized Page Format) compiles a PDF once into a hardware-ready page representation, removing PDF parsing and interpretation from the rendering path forever. At draw time, only deterministic integer arithmetic remains, running in parallel across up to six CPU cores while holding a byte-identical GPU compute path on demand for exceptional pages. On stage, a musician needs the next page the instant a pedal lands or a finger taps the screen. On a 13-inch iPad Pro (M4), HOPF renders an open score's page in a median of 3.01 ms on first draw and 0.754 ms on redraw: 8.97 and 28.7 times faster than Apple's PDFKit by geometric mean, deep inside the 8.3 ms frame budget of a 120 Hz display.
Introduction
Every PDF page is an imperative program. Designed for printers and document exchange, a page encodes a sequential stream of vector paths, embedded font programs, coordinate transforms, color spaces, and compressed image streams. Whenever a conventional viewer renders a page, the CPU executes that program from scratch: parsing objects, tracking graphics state, running font bytecode, converting colors, and decoding images. Flip back to the same page a moment later, and the CPU pays the full price all over again.
Sheet music turns that assumption upside down. A score runs to dozens or hundreds of pages, and a musician returns to the exact same pages across months of rehearsal and live performance. On a 120 Hz display, a new frame arrives every 8.3 ms, while the device runs on battery and listens to live audio in the background. Every page turn has to land inside that budget while rendering identically on the iPad on a music stand and the Mac on a desk.
Optimizing the interpreter only shaves the cost of repeating redundant work. So we took interpretation out of the rendering path altogether. When a score enters CueFlip's library, HOPF compiles the PDF once into hardware-ready page data: every number preserved losslessly, every glyph outline deduplicated across the document, every image stored for fast parallel decoding, and the source PDF sealed inside the same container. From then on, drawing executes only view-dependent math in fixed-rule integer arithmetic, producing identical bytes on every Apple chip we tested.
Once a score is open, HOPF achieves the lowest median draw latency of every renderer we benchmarked, across every page type and every device. On the iPad Pro (M4), median latency plunges to 3.01 ms on first draw and 0.754 ms on redraw, compared with 35.5 ms and 29.0 ms for PDFKit. Energy drops sharply alongside latency, and across all 491 benchmark pages, HOPF produced byte-for-byte identical output across all three Apple devices, while Apple's own renderers diverged between every pair.
This article traces a page through HOPF from end to end. It explains why a compiled representation outperforms even display-list interpreters, how the compiler lowers PDF semantics into flat operations and specialized page encodings, and how scores become readable before compilation finishes. It then details how up to six CPU cores execute exact-area rasterization, NEON image resampling, and integer pixel composition in place while keeping a byte-identical GPU kernel path ready on demand, presents benchmark latency and energy results against six established PDF engines on two Macs and an iPad Pro, validates accuracy against ISO 32000-1, examines HOPF's multi-layered security defenses and 200-session frontier penetration testing program, and outlines its staged rollout in CueFlip 1.7.
Designed for modern hardware
HOPF is built around a single invariant: compile once, read many times. Once a score enters a musician's library, its pages rarely change, while the performer opens, turns, and zooms through those same pages hundreds of times. Every piece of rendering work therefore falls into one of two domains. View-independent work (parsing, content interpretation, font execution, color resolution, transform composition) runs once at compile time. View-dependent work (mapping geometry onto the pixel grid, computing exact pixel coverage, resampling images, and compositing pixels) is all that remains at draw time.
Zooming into a dense page shows why eliminating interpretation changes the cost curve. Instead of re-interpreting an entire page stream to clip a zoomed viewport, HOPF derives each shape's bounding box from its compiled coordinates at draw time and culls everything outside the requested tile before flattening curves, expanding strokes, or rasterizing coverage, keeping raster work strictly proportional to visible notation.
Even the fastest PDF interpreter hits an architectural ceiling here, because the overhead lives in the format itself. PDF references resources indirectly, embeds fonts as executable programs, expresses colors across disparate spaces, and defines each shape relative to a mutable graphics state accumulated by preceding commands. Drawing a single shape forces an interpreter to reconstruct that state. Caching rendered bitmaps only helps at a single fixed zoom and consumes memory in proportion to pixel count. A compiled format keeps exact geometry resolution-independent while letting every draw start straight from execution-ready data.
The compiled container carries nothing tied to a specific GPU generation: no hardware tile layouts, no compressed GPU textures, and no compiled shaders. All container integers, glyph outlines, and page streams encode identically across architectures, so compiling the same PDF on an iPad and on a Mac yields byte-for-byte identical files whenever host ColorSync profile conversions match across those OS builds.
The same drawing engine (the CPU compositor and the on-demand GPU kernels) executes two rule sets over the same compiled file. HOPF Core is the format's rendering specification: it follows the PDF standard for page semantics while pinning down every rounding decision where the standard leaves pixel conversion to each implementation. A separate Quartz-compatible profile mirrors Apple's Quartz rules so we can verify HOPF directly against CoreGraphics.
Two invariants anchor the entire pipeline. The integer rule ensures every view-dependent calculation runs in exact arithmetic, yielding identical pixel bytes across the Apple chips we tested. The window rule ensures a pixel's bytes depend solely on its page position and never on the enclosing draw bounds, letting zoomed pages render in tiles that join without a seam. The sections below explain how every stage of HOPF preserves both rules.
From PDF to HOPF
The compiler does the heavy lifting upfront. Every decision about what a page means is settled once at compile time and serialized in a form that leaves nothing to interpret at draw time. The diagram below traces a PDF through the pipeline.
The compile pipeline
- PDF: the original
- Read and repair: HOPF's own parser
- Interpret: fonts, colors, state
- Classify: vector, composite, scan
- Encode: exact, each item once
- Work file: bytes, then journal
- Snapshot: pages drawable at once
- Reader: draws them
- HOPF file: drawing data, semantic index, source archive
- Once per page, the page a reader asks for first: Read and repair, Interpret, Classify, Encode, Work file, Snapshot
- PDF → Read and repair
- Read and repair → Interpret
- Interpret → Classify
- Classify → Encode
- Encode → Work file
- Work file → Snapshot (each finished page)
- Snapshot → Reader (drawn right away)
- Work file → HOPF file (after the last page)
HOPF parses PDFs with its own bounds-checked reader, covering file syntax, cross-reference tables, object streams, the page tree, encryption, and Flate, LZW, ASCII85, ASCIIHex, and run-length filters. Damaged files are repaired inline as they are read: a broken cross-reference table triggers a full-file scan for objects, and a stream with an invalid length terminates at its next end marker. Images encoded as JPEG, JPEG 2000, JBIG2, or CCITT remain compressed for HOPF's own decoders.
Next, each page's content stream is interpreted once sequentially while glyph outline extraction, parallel image preparation (including component-by-component JPEG 2000 tile decoding), and per-page payload compression fan out across CPU worker threads. The interpreter resolves graphics state, collapses nested transforms into a single matrix per operation, and lowers every color into concrete greyscale and sRGB values upfront (via ISO 32000-1 §10.3.5 for DeviceCMYK, explicit CIE math for Lab and calibrated image samples, and CoreGraphics/ColorSync for ICCBased profiles, calibrated shape colors, and device-grey conversions) so the runtime renderer requires no color management system. Font programs (TrueType, CFF, and Type 1) execute once into unhinted, unflattened outlines in font units, eliminating font execution from every downstream draw. Type 3 glyphs, stroked text, and clipping text lower directly into ordinary paths.
PDF's costliest constructs simplify cleanly at compile time. Tiling patterns of up to 400 cells unroll into plain drawing operations; larger patterns rasterize once into an image. Shadings pre-render into images bounded by exact clip paths. Single-image soft masks become clip nodes pointing directly at that image, while complex soft masks render once into an image. Transparency groups remain on the page only where they alter the visual output.
What survives compilation is a compact, state-free sequence of operations in draw order: fill a path, stroke a path, draw a glyph from the document dictionary, draw an image, or open and close a transparency group. Every operation carries its own color, matrix, and clip, removing all cross-operation state tracking at runtime. Curves stay intact as exact curves and subdivide at draw time for the active zoom, keeping edges sharp at any magnification.
As each page finishes compiling, the compiler classifies its workload. A page consisting of a single unrotated full-page 1-bit or JPEG image is stored as a scan (1-bit or JPEG plane) for direct parallel decoding and CPU resampling. Pages containing images (including single-page JPEG 2000 scans), soft masks, blend modes, or transparency groups become composites; the rest become vector pages. The compiler also flags whether a page uses color at all, allowing pure greyscale pages to be stored and rendered at one byte per pixel.
By the time a page reaches the renderer, parsing, state tracking, font programs, nested transforms, color spaces, filter chains, palettes, and patterns are already solved. Drawing simply decodes the stored streams, maps geometry to the viewport, and renders. Compile latency itself is tiny and paid only once per score: a median of 1.83 ms per page on the Mac mini (M4) and 4.32 ms on the iPad Pro (M4).
What a compiled page holds
Each page type is stored in the layout its decoder reads fastest, without losing a single bit of the original document. Three principles shape the container: group homogeneous values together so general compression works harder, store shared assets once regardless of reuse count, and partition long streams into independent blocks so every CPU core decodes in parallel.
Most numbers in a PDF originate as short decimals. HOPF scales each column of numbers into integers using a column-specific decimal multiplier, stores values as differences from the preceding entry, and tags rare outliers that sit one unit in the last place off the decimal or require full 64-bit precision. Every value restores bit for bit, preserving exact geometry. Within each page, ten typed data streams (structure, path commands, colors, glyph positions, matrices, path coordinates, and more) pack behind a ten-entry length table and compress together in one LZFSE pass per page, keeping homogeneous columns adjacent so LZFSE decodes at 0.7 to 0.9 times LZ4's speed while taking a third less space. Each operation also flags whether its clip, color, and matrix match its predecessor, letting long runs of identically styled glyphs omit redundant metadata.
All glyphs in a document live in one shared dictionary. Identical outlines at the same scale are stored once regardless of font origin, so merged PDFs carrying overlapping font subsets share their common glyphs cleanly. The dictionary stays uncompressed for constant-time random per-glyph reads, and each entry carries a compile-time flag marking whether its winding number takes only two values (zero and one non-zero value), enabling a sort-free coverage fast path.
1-bit scanned pages use a custom parallel codec built for sheet music. Each scanline encodes differentially against the row above using ITU-T T.6 fax modes: color transitions within three pixels of the row above emit a single offset symbol, and remaining spans emit run lengths. Symbols then pass through an integer-only rANS entropy coder with one per-page frequency table conditioned on the previous symbol and current color. Every 256 rows, the coder resets to an all-white row so horizontal bands decode across all CPU cores in parallel with bit-identical results on every machine. CCITT fax streams that decode to the exact same bits stay verbatim; JBIG2 images decode once at compile time and re-encode into this parallel format.
JPEG scans keep their exact coefficients while gaining parallel decode and lower file size. Standard JPEG is a single sequential entropy stream locked to one CPU core. During compilation, HOPF records decoder state at up to 32 checkpoints down the image, feeding multi-core decoding with headroom to spare. For standard-encoded JPEGs, HOPF losslessly re-encodes the identical symbols using context-selected Huffman tables conditioned on block position, neighbor activity, and prior magnitude. Coefficients never change, original JPEG bytes restore identically, file size drops by about a quarter at equal read speed, and grey pages read luminance alone without touching chroma.
JPEG 2000 codestreams stay intact for HOPF's own integer decoder. Other images compress as sample planes under LZFSE, while 8-bit Flate images whose decoded samples already match stay in their original streams. Every image is deduplicated across the document by kind, dimensions, mask, and byte SHA-256 regardless of how many pages reference it.
The container layout is tuned for instant random access. Every page has a fixed-size record at a known offset, making page 9,000 as fast to locate as page 2: one multiply and one read. The page and image payload section begins at a 16 KiB boundary (the memory page size on Apple Silicon), small tables pack into the gap between the 128-byte superblock and 16 KiB, remaining tables append contiguously right after page data without padding gaps, and individual page and image payloads align to 128-byte cache lines. Opening a page in a 10,000-page document on MacBook Pro (M5 Pro) without drawing took CoreGraphics 3.96 ms at page 237 and 3.99 ms at page 9,000 across fresh-process medians, whereas HOPF located both in 0.164 ms and 0.167 ms, about 24 times faster.
Opening a page deep in a document
- From the PDF
- From HOPF
The finished container holds three independently versioned parts: drawing data, a semantic index, and a source archive. The semantic index stores page-level metadata outside the rendering path (page boxes, rotation, text-selection rectangles, link targets), so reading one page never unpacks an entire book. The source archive preserves the original PDF by referencing exact byte-matching image streams already in drawing data and compressing remaining blocks; restored PDFs verify by SHA-256 before release. Independent versioning guarantees future readers can recover the source PDF even as the drawing format evolves.
Checksums protect every read against silent corruption. On open, a single XXH64 checksum validates the container tables; each page and each image carries its own checksum verified once on first access and cached in memory, keeping open time independent of document length. Any payload failing verification is never passed to the renderer.
Compiling while the score is open
A musician opening a new score should never stare at a progress bar. HOPF compiles one page at a time and makes every page drawable the instant it completes, putting page one on screen long before the rest of the score finishes.
Opening a file reads only the container structure and page tree, establishing page count, dimensions, and rotation immediately so the reader can lay out the entire score. Pages requested by the reader compile first, with newer requests preempting earlier ones so rapid page flips always jump to the front. During idle moments, lookahead compiles up to 16 pages ahead with parallel image decoding, halting instantly the moment a user request arrives. Inside CueFlip, background compilation yields completely during live performance following, zooming, and Low Power Mode.
Each compiled page appends to a working file, and only after its bytes are written does an entry append to an accompanying journal. Every journal record stores the payload checksum alongside a trailing XXH64 checksum for the record itself, ensuring the journal never points to missing data. Stopping mid-compile loses at most the uncommitted work in flight.
On reopen, the journal replays up to the first entry that fails validation: a mismatched checksum, an out-of-bounds offset, or bytes diverging from their recorded digest. The working file trims back via a truncated copy and atomic rename, so readers with the prior file mapped into memory never fault. Before resuming, HOPF verifies the source PDF is unchanged using a fast fingerprint (file length, modification time, and first and last 64 KiB) followed by a full-file SHA-256 computed in slices between page compiles. Changed source files restart cleanly; checksums guarantee safe resumption without stalling on disk flushes.
At any moment, the compiler exposes a read-only snapshot mapping finished page payloads from the working file and tables from memory. Uncompiled pages remain represented with their size and rotation while awaiting compilation. Successive snapshots preserve every existing image and glyph identifier so already decoded assets remain valid.
Once the final page finishes, tables append after the page payloads, the superblock writes last at byte zero, and the file renames atomically into place. A file without a superblock is never recognized as a HOPF file, ensuring compilation completes atomically or leaves no trace. Pixel output never depends on compile sequence: compiling in any order draws identical pixels, while compiling in page order yields byte-identical files.
Even cold-opening an unseen PDF, compiling page zero on the spot, and drawing it beats every tested renderer on both Macs: a median of 6.53 ms on Mac mini (M4) and 6.33 ms on MacBook Pro (M5 Pro). By geometric mean, HOPF is 1.88 and 2.00 times faster than PDFium, and 3.03 to 18.1 times faster than MuPDF (including display-list playback), Poppler, CoreGraphics, PDFKit, and pdf.js. The chart below shows the full latency distribution.
From a new PDF to its first page
| Renderer | 50% of documents within | Overall, HOPF faster by | Overall, HOPF faster on |
|---|---|---|---|
| HOPF | 6.53 ms | – | – |
| CoreGraphics | 40.6 ms | 4.89× | 98% |
| PDFKit | 52.2 ms | 7.33× | 100% |
| PDFium | 14.1 ms | 1.88× | 81% |
| MuPDF | 27.8 ms | 3.03× | 89% |
| MuPDF, display list | 27.8 ms | 3.04× | 92% |
| pdf.js | 114 ms | 17.5× | 100% |
| Poppler | 35.4 ms | 5.39× | 98% |
| Renderer | 50% of documents within | Overall, HOPF faster by | Overall, HOPF faster on |
|---|---|---|---|
| HOPF | 6.33 ms | – | – |
| CoreGraphics | 45.9 ms | 5.39× | 98% |
| PDFKit | 62.6 ms | 9.30× | 100% |
| PDFium | 13.9 ms | 2.00× | 88% |
| MuPDF | 26.0 ms | 3.05× | 93% |
| MuPDF, display list | 25.9 ms | 3.07× | 93% |
| pdf.js | 116 ms | 18.1× | 100% |
| Poppler | 33.0 ms | 5.38× | 98% |
| Share of documents | HOPF | CoreGraphics | PDFKit | PDFium | MuPDF | MuPDF, display list | pdf.js | Poppler |
|---|---|---|---|---|---|---|---|---|
| 0% | 2.37 | 7.30 | 21.8 | 1.87 | 1.71 | 1.70 | 78.3 | 4.13 |
| 5% | 2.49 | 7.71 | 22.5 | 2.41 | 3.38 | 3.47 | 81.8 | 6.76 |
| 10% | 2.62 | 8.89 | 23.7 | 4.29 | 5.04 | 5.08 | 85.0 | 9.77 |
| 15% | 3.12 | 10.2 | 24.9 | 5.19 | 7.36 | 7.53 | 88.2 | 12.3 |
| 20% | 3.39 | 11.1 | 26.5 | 5.98 | 10.5 | 10.6 | 94.0 | 16.6 |
| 25% | 3.46 | 19.7 | 34.6 | 7.34 | 11.6 | 11.7 | 96.9 | 21.7 |
| 30% | 3.73 | 27.0 | 38.5 | 8.71 | 14.4 | 14.5 | 98.6 | 23.6 |
| 35% | 4.11 | 29.8 | 43.7 | 9.34 | 20.1 | 19.9 | 100 | 28.2 |
| 40% | 4.86 | 33.3 | 46.5 | 10.6 | 21.1 | 20.8 | 104 | 28.8 |
| 45% | 6.04 | 34.9 | 48.6 | 12.8 | 23.8 | 23.5 | 108 | 32.6 |
| 50% | 6.53 | 40.6 | 52.2 | 14.1 | 27.8 | 27.8 | 114 | 35.4 |
| 55% | 8.25 | 44.3 | 59.2 | 16.7 | 30.7 | 30.6 | 118 | 37.7 |
| 60% | 10.3 | 51.1 | 62.4 | 17.9 | 33.8 | 33.7 | 122 | 40.5 |
| 65% | 11.0 | 53.6 | 67.8 | 20.6 | 36.3 | 36.2 | 149 | 56.7 |
| 70% | 12.4 | 57.6 | 70.0 | 22.1 | 37.7 | 37.9 | 164 | 82.3 |
| 75% | 14.9 | 78.2 | 85.2 | 26.3 | 47.2 | 47.2 | 170 | 99.6 |
| 80% | 16.4 | 80.6 | 92.4 | 32.3 | 51.9 | 52.0 | 186 | 123 |
| 85% | 19.3 | 88.2 | 97.9 | 39.3 | 63.1 | 63.0 | 206 | 150 |
| 90% | 22.6 | 113 | 127 | 46.0 | 74.9 | 74.3 | 257 | 175 |
| 95% | 31.3 | 168 | 180 | 80.4 | 89.3 | 89.1 | 305 | 251 |
| 99% | 44.5 | 299 | 321 | 121 | 178 | 176 | 365 | 410 |
| 100% | 48.6 | 309 | 325 | 121 | 215 | 214 | 599 | 456 |
| Share of documents | HOPF | CoreGraphics | PDFKit | PDFium | MuPDF | MuPDF, display list | pdf.js | Poppler |
|---|---|---|---|---|---|---|---|---|
| 0% | 2.39 | 8.46 | 32.7 | 1.95 | 1.84 | 1.80 | 78.1 | 4.35 |
| 5% | 2.50 | 9.22 | 33.5 | 2.46 | 3.70 | 3.78 | 82.8 | 6.75 |
| 10% | 2.59 | 10.3 | 35.1 | 4.39 | 5.01 | 5.02 | 86.8 | 10.2 |
| 15% | 3.14 | 11.1 | 37.5 | 5.03 | 6.99 | 7.54 | 91.9 | 12.2 |
| 20% | 3.42 | 12.4 | 40.1 | 6.69 | 10.3 | 10.3 | 95.6 | 17.1 |
| 25% | 3.51 | 21.1 | 45.8 | 7.63 | 11.6 | 12.0 | 98.6 | 20.7 |
| 30% | 3.66 | 27.2 | 50.9 | 9.17 | 13.8 | 15.0 | 101 | 22.8 |
| 35% | 4.21 | 32.1 | 55.1 | 10.4 | 18.4 | 18.3 | 102 | 27.4 |
| 40% | 4.58 | 34.5 | 57.5 | 11.7 | 20.6 | 20.4 | 105 | 28.8 |
| 45% | 5.83 | 39.9 | 59.1 | 12.4 | 22.4 | 22.2 | 108 | 30.8 |
| 50% | 6.33 | 45.9 | 62.6 | 13.9 | 26.0 | 25.9 | 116 | 33.0 |
| 55% | 7.65 | 47.3 | 68.4 | 16.5 | 29.9 | 30.0 | 118 | 35.6 |
| 60% | 9.49 | 49.3 | 72.4 | 18.3 | 32.6 | 32.2 | 122 | 40.2 |
| 65% | 10.7 | 52.9 | 74.9 | 20.2 | 34.6 | 34.8 | 145 | 52.7 |
| 70% | 12.1 | 62.8 | 77.7 | 24.6 | 35.7 | 35.5 | 156 | 75.5 |
| 75% | 13.4 | 72.6 | 93.0 | 26.8 | 42.9 | 42.9 | 169 | 90.9 |
| 80% | 14.5 | 83.4 | 98.4 | 31.9 | 48.9 | 48.8 | 182 | 107 |
| 85% | 16.5 | 92.7 | 103 | 38.9 | 60.8 | 59.6 | 192 | 134 |
| 90% | 19.8 | 112 | 130 | 47.7 | 71.8 | 70.7 | 231 | 168 |
| 95% | 30.5 | 154 | 177 | 77.0 | 86.1 | 85.1 | 282 | 223 |
| 99% | 42.6 | 273 | 300 | 115 | 166 | 168 | 347 | 362 |
| 100% | 47.0 | 280 | 303 | 118 | 198 | 200 | 505 | 403 |
Drawing a page
On Apple Silicon unified memory, drawing straight on the CPU eliminates GPU command submission, driver allocation, and cross-processor synchronization altogether. Up to six CPU cores decode page streams, compute exact pixel coverage, resample images, and composite pixels directly into application memory in horizontal bands of rows, turning typical score pages in under a millisecond. If a destination buffer is not CPU-visible, a scan resample exceeds the CPU sampler's 64 MiB ring limit, or an extraordinary page hits a structural or memory-room condition that the CPU compositor declines, HOPF dispatches compute kernels to an on-demand GPU path producing byte-identical output. None of the 90 real musical scores in our benchmark library ever needed GPU offload. The diagram below traces a draw request straight into display memory.
The drawing pipeline
- Request: a page or a region
- Page record: found in one read
- HOPF file: mapped into memory
- Cull and place: outside: skipped
- Coverage: exact area
- Stamps: in drawing order
- Resample: 14-bit weights
- Compose: rows in bands
- Compose: the same bytes
- App memory: grey or BGRA
- App: Request, App memory
- CPU, up to six cores: Cull and place, Coverage, Stamps, Resample, Compose
- GPU, on demand: Compose
- Kept between draws: Decoded pages, Glyph outlines
- Request → Page record
- HOPF file → Page record
- Page record → Cull and place
- Cull and place → Coverage
- Coverage → Stamps
- Stamps → Compose (masks, read in place)
- Kept between draws → Resample
- Resample → Compose
- Compose → App memory (written in, no copy)
- Compose → Compose (a page it declines)
- Compose → App memory
The app requests either a full page or a zoomed viewport region, delivered in 512 px tiles up to 12 tiles (about a screenful) per batch. HOPF locates the page record, validates its checksum on first access, and decodes only the assets required for that view. For each path or glyph, HOPF computes and transforms its bounding box against the target region at draw time before flattening curves, expanding strokes, or rasterizing coverage, so a zoomed tile pays zero raster work for shapes outside its bounds.
Surviving shapes map onto the pixel grid. Each operation matrix combines with the view transform, transforms points in a fixed operation order, and rounds coordinates to 1/4096 of a pixel; from there onward, all arithmetic is strictly integer. Curves flatten in device space using Wang's formula at 1/32 px tolerance (bounded to at most eight coverage levels in the worst case, and typically under two). Strokes expand into outlines in user space within half the line width plus joins and caps, relying on the nonzero fill rule to resolve overlaps without computing offset intersections. Glyphs render strictly at their document coordinates with no hinting, pixel snapping, or synthetic emboldening.
Coverage is exact area. For every pixel, HOPF computes the area of the painted region inside it in units of 2⁻²⁵ of a pixel, quantizing to 8 bits inside 32-bit integer arithmetic. Within each pixel row, edges reduce to straight segments spanning entry and exit, strictly ordered in 64-bit integers by x-position, slope, and stable-sort rank. The fill rule assigns each segment a sign: adding area where the painted region begins to its right, subtracting where it terminates, and adding zero where both sides match, filling overlapping paths once as ISO 32000-1 specifies.
The scanline solver stays fast by processing only state transitions. Segments split solely at row boundaries, endpoints, and heights where their fill role flips. Crossing segments swap places at the exact integer height where their order inverts, touching only adjacent neighbors so row cost scales as segments plus events, never their product. Most shapes take specialized fast paths yielding identical bytes: two-value-winding glyphs skip sorting completely, single convex contours sum directly per edge, axis-aligned rectangles multiply column by row coverage, and disjoint bounding boxes emit tight independent masks. Work balances by complexity across up to six CPU cores, returning masks strictly in operation order.
Operations condense into a compact list of stamps: positioned coverage masks, pixel-aligned rectangles with partial edges, or image placements in strict draw order. The CPU compositor partitions the viewport into horizontal bands of rows across up to six worker threads. Each pixel begins white and folds in every covering stamp in sequence: coverage times opacity produces alpha, and each color channel updates via exact integer division by 255, (source × alpha + destination × (255 − alpha) + 127) / 255. On arm64, NEON SIMD evaluates that division cleanly as (t + 128 + ((t + 128) >> 8)) >> 8, exhaustively verified against exact division for every possible value. When an exceptional page routes to the GPU, compute shaders bin stamps into 16 × 16 tiles with one thread per pixel and produce the exact same bytes.
Transparency groups and blend modes compose inline using exact integer formulas for all sixteen PDF blend modes. On the CPU, each pixel maintains compact per-level state strictly across each group's bounding rectangle without allocating offscreen render targets; on the GPU path, per-thread stacks compute matching byte values identically.
Images resample on the CPU using NEON vector instructions and the exact same 14-bit fixed-point weights summing strictly to 16,384: downscaling box-averages samples within each pixel footprint, while upscaling interpolates linearly between the two nearest samples. Weights round cumulatively so every weight is non-negative and sums strictly to one based solely on page pixel coordinates. 1-bit scans decode into a compact flat 1-bit-per-pixel bitmap, allowing the CPU sampler to skip entire all-white scanlines and 64-bit bit-words across wide page margins and blank staff space in a single step.
Final pixels write directly into application memory: one byte per pixel for greyscale pages and BGRA for color pages in native display layout, avoiding staging bitmaps, channel swizzles, and driver transfers. All tiles of a page share decoded sample planes and composite in place on the CPU.
Memory and caches
HOPF keeps what is expensive to rebuild and drops what is cheap to regenerate. Scanned pages decode once into page-aligned memory owned by the drawer, serving every zoom level and tile until evicted so zooming a scan never re-decodes it; on a newly opened score's first-shown page, JPEG 2000 planes decoded during initial page compilation hand off directly to the first draw so the page decodes once. When two pages are shown side by side, the app tells HOPF which pages are visible so HOPF prioritizes keeping them decoded. Inside composite pages, raw decoded image planes cache lazily under a 16 MiB source cache (split across active lanes), while the app configures a separate 12 to 40 MiB decoded-page budget scaled to device RAM (also shared across active lanes) that bounds retained scan planes, CPU-turned picture copies, and the latest page's resampled buffer, alongside an active-page limit capped at 512 MiB or one-eighth of device RAM, whichever is smaller. If a page routes to the GPU, that aligned memory passes zero-copy.
Coverage masks and resampling weights regenerate cleanly on every draw, with masks packed sequentially inside a single buffer read in place by the CPU compositor. Glyph outlines share a document-wide cache capped at 64 MiB; because the glyph dictionary supports direct per-glyph reads, reloading an evicted outline is instantaneous.
Large buffers recycle in a pool rather than returning to the allocator, avoiding fresh page faults during rapid page turns, while CPU workers borrow scratch memory from thread pools. Because typical scores render completely on CPU cores, HOPF performs zero GPU warmup at launch and initializes the Metal device and its precompiled integer pipelines lazily only if a page genuinely requires GPU offload, avoiding roughly 60 MB of Metal driver memory that otherwise lingers until the GPU has been idle for a couple of seconds.
When every page in a score is vector or composite (and picture footprints leave enough memory headroom), the app dispatches up to three concurrent drawers across distinct pages, scaling back to one under Low Power Mode, thermal pressure, or memory constraints. On system memory warnings, HOPF releases decoded pages, drawing state, and temporary pools on a background queue without stalling the interface.
Byte for byte
Across all 491 benchmark pages, HOPF rendered byte-for-byte identical output between every pair of devices we tested: iPad Pro (M4), Mac mini (M4), and MacBook Pro (M5 Pro). Across every page and every device, the App's CPU drawer, the on-demand GPU path, and the pure software CPU reference also produce the exact same bytes as one another, while Apple's CoreGraphics and PDFKit differed between every device pair.
That invariance comes from the integer rule. Both HOPF's CPU compositor (every value a whole integer from 0 to 255) and its GPU compute kernels execute pixel math with zero floating-point values, leaving zero rounding latitude between processor generations. On CPU geometry setup steps, calculations restrict themselves strictly to addition, subtraction, multiplication, division, and square root, the five operations IEEE 754 requires to be correctly rounded, with fused multiply-add disabled. System math functions that approximate results (sine, cosine, power) are never called; JPEG cosine tables are hardcoded constants, and stroke joins compute purely from square roots. Automated build checks scan both rendering paths, failing on any disallowed floating-point or transcendental call.
The window rule makes output invariant to the drawn region. A viewport window selects which pixels execute without ever altering how they are computed: transforms remain page-global, rows and columns snap to integer pixels, resampling weights derive strictly from page coordinates, and edges left of a window propagate exact accumulated coverage into its first column. An isolated 512 px tile therefore matches the exact byte slice of a full-page render, eliminating tile seams with zero full-page checks.
Thread scheduling cannot leak into the pixels either. On the CPU, horizontal row bands distribute to worker threads while each pixel folds covering stamps in exact operation order regardless of thread timing, and parallel coverage workers write straight into fixed operation slots. Scanline segments maintain a strict total order that resolves all start, end, and swap events at a height before deciding any segment's fill role. On the GPU path, dedicated per-pixel threads obey the exact same draw sequence with a single commutative bitwise AND.
To verify every execution tier against a pure software baseline, HOPF includes a single-threaded CPU reference path sharing exact definitions, coverage rules, and weight tables. Across all 1,896 pages of our 90-score library, the App drawer, GPU kernels, and CPU reference produce identical hashes, and a targeted cross-check spanning 905 vector and composite pages across 11,510 viewport renders recorded zero differences between CPU and GPU execution. Inside the iPad app, 14,400 GPU and CPU draws matched 100% byte-for-byte; x86_64 and arm64 builds agree identically (where CoreGraphics diverges on 276 pages between architectures); Debug and Release builds match; iOS 17.0, 18.0, and 27.0 simulators agree with macOS; and isolated 512 px tiles match slices cropped from full-page renders.
The table below reports pairwise byte matches across all three devices. HOPF matched 491 of 491 pages on every pair, whereas CoreGraphics and PDFKit matched 432 between the two Macs, 329 between iPad Pro and Mac mini, and 271 between iPad Pro and MacBook Pro.
The same bytes across devices
| Renderer | MacBook Pro and Mac mini | MacBook Pro and iPad Pro | Mac mini and iPad Pro |
|---|---|---|---|
| Across devices | |||
| HOPF | 491 of 491 | 491 of 491 | 491 of 491 |
| HOPF, CPU reference | 491 of 491 | Not run on the iPad | Not run on the iPad |
| CoreGraphics | 432 of 491 | 271 of 491 | 329 of 491 |
| PDFKit | 432 of 491 | 271 of 491 | 329 of 491 |
| PDFium | 491 of 491 | 328 of 328 grey pages only | 328 of 328 grey pages only |
| MuPDF | 491 of 491 | Not run on the iPad | Not run on the iPad |
| MuPDF, display list | 491 of 491 | Not run on the iPad | Not run on the iPad |
| pdf.js | 491 of 491 | Not run on the iPad | Not run on the iPad |
| Poppler | 491 of 491 | Not run on the iPad | Not run on the iPad |
| On one device, the GPU against the CPU reference | |||
| HOPF | 491 of 491 on the MacBook Pro | ||
Bit-exact determinism streamlines both verification and rendering across Apple Silicon. Zoomed tiles stitch seamlessly with zero cross-checks against whole pages, and every renderer change produces an exact page-level byte diff, letting us verify that a fix changes only what it was meant to change.
Performance and energy
Once a score is open, HOPF records the lowest median latency of every benchmarked renderer across all three devices and all four page categories, keeping every page category on iPad Pro (M4) comfortably inside the 8.3 ms frame budget even on first draw (composite pages 5.40 ms, JPEG scans 3.55 ms, 1-bit scans 1.84 ms, and vector pages 2.01 ms). Here, a first draw measures a page's initial render after opening a document in a fresh process, a redraw measures repeating the same page with warm caches, and geometric means summarize per-page speedups without allowing extreme outliers to skew the result.
We conducted the cross-renderer benchmark on November 16, 2026 across 491 pages sampled from 90 real musical scores, up to 6 pages per score (168 composite pages, 85 JPEG scans, 111 1-bit scans, and 127 vector pages), rendered at 1668 px wide on white with 1-byte greyscale output where supported. Each renderer processed every document twice in fresh processes using ABBA ordering and a seeded random document sequence, isolating library startup and open from first draw and three warm redraws. Testing ran on a MacBook Pro (M5 Pro, 48 GB, macOS 27.0, with background workloads occupying a median of 1.1 cores), a nearly idle Mac mini (M4, 16 GB, macOS 27.2), and a 13-inch iPad Pro (M4, 8 GB, iPadOS 27.0.1). HOPF (November 2026 build) ran alongside Apple's CoreGraphics and PDFKit, PDFium 159.0.8152.0, and on the Macs, MuPDF 1.28.6 (tested both directly and replaying a once-recorded display list), Poppler 26.06.0 and 26.04.0 (Splash backend), and pdf.js 6.5.438 on Node with @napi-rs/canvas 1.1.1.
The table below details first draws by page type, redraws, one-time compile overhead, startup and opening, and peak memory per device. On iPad Pro, HOPF hits a median of 3.01 ms on first draw and 0.754 ms on redraw across all pages, compared with 35.5 ms and 29.0 ms for PDFKit; on MacBook Pro, medians drop to 1.50 ms and 0.396 ms.
Benchmark results
| Measurement | HOPF | CoreGraphics | PDFKit | PDFium | MuPDF | MuPDF, display list | pdf.js | Poppler |
|---|---|---|---|---|---|---|---|---|
| First draw | ||||||||
| Composite median of 168 pages | 3.38 ms | 36.0 ms | 35.7 ms | 19.3 ms | 30.5 ms | 26.7 ms | 52.3 ms | 39.4 ms |
| JPEG scan median of 85 pages | 1.69 ms | 27.7 ms | 26.4 ms | 11.7 ms | 24.6 ms | 24.1 ms | 76.1 ms | 36.4 ms |
| 1-bit scan median of 111 pages | 0.980 ms | 50.7 ms | 50.3 ms | 14.4 ms | 33.8 ms | 33.1 ms | 48.0 ms | 29.3 ms |
| Vector median of 127 pages | 1.12 ms | 5.63 ms | 5.52 ms | 4.03 ms | 4.74 ms | 3.01 ms | 21.5 ms | 9.63 ms |
| All pages median of 491 pages | 1.40 ms | 32.1 ms | 32.2 ms | 12.2 ms | 24.9 ms | 23.8 ms | 43.9 ms | 29.2 ms |
| Redraw | ||||||||
| All pages median of 491 pages | 0.526 ms | 13.0 ms | 13.1 ms | 9.44 ms | 17.0 ms | 15.1 ms | 13.1 ms | 28.9 ms |
| Costs | ||||||||
| One-time compile per page, median of 90 documents | 1.83 ms | Does not apply | Does not apply | Does not apply | Does not apply | Does not apply | Does not apply | Does not apply |
| Start-up and opening median of 90 documents | 0.0783 ms | 1.75 ms | 17.5 ms | 0.112 ms | 0.568 ms | 0.567 ms | 128 ms | 0.600 ms |
| Peak memory median of 90 documents | 44.9 MB | 49.8 MB | 52.3 MB | 40.2 MB | 65.3 MB | 65.3 MB | 310 MB | 31.1 MB |
Versions: HOPF, November 2026 build; CoreGraphics and PDFKit in macOS 27.2 (26B123); PDFium 159.0.8152.0; MuPDF 1.28.6; pdf.js 6.5.438 (@napi-rs/canvas 1.1.1, node 25.9.0); Poppler 26.04.0 (Splash).
| Measurement | HOPF | CoreGraphics | PDFKit | PDFium | MuPDF | MuPDF, display list | pdf.js | Poppler |
|---|---|---|---|---|---|---|---|---|
| First draw | ||||||||
| Composite median of 168 pages | 3.17 ms | 35.3 ms | 35.0 ms | 18.5 ms | 28.6 ms | 25.3 ms | 52.1 ms | 37.7 ms |
| JPEG scan median of 85 pages | 1.68 ms | 27.3 ms | 24.6 ms | 11.5 ms | 22.7 ms | 22.2 ms | 83.7 ms | 34.0 ms |
| 1-bit scan median of 111 pages | 0.837 ms | 45.3 ms | 44.3 ms | 13.4 ms | 32.5 ms | 31.9 ms | 43.5 ms | 29.1 ms |
| Vector median of 127 pages | 1.10 ms | 5.48 ms | 5.40 ms | 3.97 ms | 4.54 ms | 3.02 ms | 20.2 ms | 9.82 ms |
| All pages median of 491 pages | 1.50 ms | 30.3 ms | 29.5 ms | 11.4 ms | 22.7 ms | 21.9 ms | 42.2 ms | 28.4 ms |
| Redraw | ||||||||
| All pages median of 491 pages | 0.396 ms | 10.7 ms | 11.2 ms | 8.80 ms | 15.3 ms | 14.3 ms | 12.0 ms | 27.4 ms |
| Costs | ||||||||
| One-time compile per page, median of 90 documents | 1.64 ms | Does not apply | Does not apply | Does not apply | Does not apply | Does not apply | Does not apply | Does not apply |
| Start-up and opening median of 90 documents | 0.124 ms | 2.55 ms | 28.1 ms | 0.158 ms | 0.700 ms | 0.701 ms | 122 ms | 0.685 ms |
| Peak memory median of 90 documents | 46.0 MB | 50.5 MB | 53.7 MB | 40.6 MB | 65.6 MB | 65.5 MB | 325 MB | 31.4 MB |
Versions: HOPF, November 2026 build; CoreGraphics and PDFKit in macOS 27.0 (26A428); PDFium 159.0.8152.0; MuPDF 1.28.6; pdf.js 6.5.438 (@napi-rs/canvas 1.1.1, node 26.0.0); Poppler 26.06.0 (Splash).
| Measurement | HOPF | CoreGraphics | PDFKit | PDFium |
|---|---|---|---|---|
| First draw | ||||
| Composite median of 168 pages | 5.40 ms | 44.0 ms | 43.4 ms | 20.9 ms |
| JPEG scan median of 85 pages | 3.55 ms | 28.2 ms | 28.1 ms | 14.8 ms |
| 1-bit scan median of 111 pages | 1.84 ms | 64.3 ms | 63.8 ms | 19.5 ms |
| Vector median of 127 pages | 2.01 ms | 6.15 ms | 6.09 ms | 5.52 ms |
| All pages median of 491 pages | 3.01 ms | 34.0 ms | 35.5 ms | 14.4 ms |
| Redraw | ||||
| All pages median of 491 pages | 0.754 ms | 28.9 ms | 29.0 ms | 9.75 ms |
| Costs | ||||
| One-time compile per page, median of 90 documents | 4.32 ms | Does not apply | Does not apply | Does not apply |
| Start-up and opening median of 90 documents | 0.663 ms | 1.98 ms | 2.25 ms | 1.16 ms |
| Peak memory median of 90 documents | 51.3 MB | 52.9 MB | 53.9 MB | 48.7 MB |
Versions: HOPF, November 2026 build; CoreGraphics and PDFKit in iPadOS 27.0.1; PDFium 159.0.8152.0.
Tail latency shows how consistently that speed holds up. On first draw, 95% of pages finish within 7.35 ms on Mac mini (6.66 ms on MacBook Pro) and 17.3 ms on iPad Pro, while the other renderers spread into far longer tails: on iPad Pro, PDFium's 95th percentile reaches 85.5 ms and CoreGraphics hits 164 ms. Against PDFium, the fastest competing engine, HOPF wins 100% of all 491 pages on first draw and 99.8% on redraw on iPad Pro.
Share of pages drawn within a given time
| Renderer | 50% of pages within |
|---|---|
| HOPF | 1.40 ms |
| CoreGraphics | 32.1 ms |
| PDFKit | 32.2 ms |
| PDFium | 12.2 ms |
| MuPDF | 24.9 ms |
| MuPDF, display list | 23.8 ms |
| pdf.js | 43.9 ms |
| Poppler | 29.2 ms |
| Renderer | 50% of pages within |
|---|---|
| HOPF | 1.50 ms |
| CoreGraphics | 30.3 ms |
| PDFKit | 29.5 ms |
| PDFium | 11.4 ms |
| MuPDF | 22.7 ms |
| MuPDF, display list | 21.9 ms |
| pdf.js | 42.2 ms |
| Poppler | 28.4 ms |
| Renderer | 50% of pages within |
|---|---|
| HOPF | 3.01 ms |
| CoreGraphics | 34.0 ms |
| PDFKit | 35.5 ms |
| PDFium | 14.4 ms |
| Share of pages | HOPF | CoreGraphics | PDFKit | PDFium | MuPDF | MuPDF, display list | pdf.js | Poppler |
|---|---|---|---|---|---|---|---|---|
| 0% | 0.426 | 1.85 | 1.90 | 1.41 | 1.07 | 0.612 | 6.59 | 4.01 |
| 5% | 0.622 | 4.03 | 4.08 | 3.04 | 2.16 | 1.29 | 13.1 | 7.28 |
| 10% | 0.682 | 4.85 | 4.78 | 3.57 | 3.07 | 2.05 | 15.5 | 9.01 |
| 15% | 0.722 | 5.78 | 5.68 | 3.89 | 4.81 | 3.38 | 18.6 | 10.5 |
| 20% | 0.784 | 6.86 | 6.64 | 4.79 | 6.31 | 4.59 | 19.9 | 12.7 |
| 25% | 0.873 | 8.82 | 8.95 | 5.58 | 9.18 | 6.70 | 21.0 | 18.4 |
| 30% | 0.956 | 14.5 | 16.4 | 6.65 | 10.6 | 9.85 | 23.2 | 21.3 |
| 35% | 1.06 | 22.8 | 22.5 | 7.63 | 14.2 | 13.1 | 28.0 | 22.8 |
| 40% | 1.15 | 25.5 | 25.4 | 9.17 | 18.4 | 16.8 | 31.6 | 27.0 |
| 45% | 1.25 | 28.5 | 28.7 | 10.5 | 21.3 | 19.8 | 35.9 | 28.2 |
| 50% | 1.40 | 32.1 | 32.2 | 12.2 | 24.9 | 23.8 | 43.9 | 29.2 |
| 55% | 1.60 | 34.8 | 35.0 | 13.5 | 25.7 | 25.2 | 49.3 | 32.2 |
| 60% | 1.85 | 40.3 | 40.1 | 14.7 | 27.5 | 26.6 | 69.6 | 36.4 |
| 65% | 2.35 | 46.2 | 46.2 | 17.4 | 30.1 | 29.2 | 81.1 | 37.8 |
| 70% | 2.89 | 49.8 | 49.8 | 20.1 | 33.8 | 33.4 | 87.9 | 47.0 |
| 75% | 3.34 | 56.6 | 55.8 | 22.1 | 37.9 | 36.8 | 93.7 | 61.7 |
| 80% | 4.15 | 66.2 | 66.4 | 25.0 | 41.9 | 41.3 | 104 | 83.2 |
| 85% | 5.11 | 79.7 | 78.0 | 30.1 | 48.4 | 47.6 | 131 | 109 |
| 90% | 5.92 | 110 | 109 | 36.3 | 59.1 | 57.9 | 170 | 154 |
| 95% | 7.35 | 159 | 159 | 86.9 | 84.4 | 81.9 | 203 | 208 |
| 99% | 12.1 | 301 | 301 | 117 | 186 | 183 | 499 | 443 |
| 100% | 27.0 | 308 | 307 | 121 | 215 | 214 | 594 | 486 |
| Share of pages | HOPF | CoreGraphics | PDFKit | PDFium | MuPDF | MuPDF, display list | pdf.js | Poppler |
|---|---|---|---|---|---|---|---|---|
| 0% | 0.372 | 1.86 | 1.88 | 1.37 | 1.00 | 0.606 | 5.99 | 4.20 |
| 5% | 0.528 | 4.05 | 3.99 | 2.92 | 2.09 | 1.25 | 11.6 | 7.39 |
| 10% | 0.631 | 4.76 | 4.74 | 3.29 | 2.93 | 1.93 | 14.0 | 8.87 |
| 15% | 0.679 | 5.72 | 5.62 | 3.70 | 4.71 | 3.28 | 16.8 | 10.3 |
| 20% | 0.746 | 6.96 | 6.50 | 4.53 | 5.95 | 4.26 | 17.7 | 12.3 |
| 25% | 0.825 | 9.06 | 8.61 | 5.55 | 8.72 | 6.54 | 18.8 | 17.9 |
| 30% | 0.911 | 15.4 | 15.4 | 6.67 | 10.1 | 9.61 | 21.7 | 19.8 |
| 35% | 1.00 | 21.3 | 20.8 | 7.71 | 13.0 | 12.3 | 25.2 | 21.6 |
| 40% | 1.14 | 24.6 | 23.9 | 8.98 | 16.5 | 16.2 | 28.5 | 25.1 |
| 45% | 1.24 | 27.3 | 26.7 | 10.3 | 20.3 | 18.7 | 33.5 | 26.6 |
| 50% | 1.50 | 30.3 | 29.5 | 11.4 | 22.7 | 21.9 | 42.2 | 28.4 |
| 55% | 1.66 | 33.5 | 33.6 | 12.7 | 24.0 | 24.0 | 51.0 | 31.1 |
| 60% | 1.90 | 39.3 | 39.2 | 14.1 | 25.4 | 25.1 | 70.4 | 34.0 |
| 65% | 2.34 | 42.8 | 42.1 | 16.6 | 27.9 | 27.1 | 78.8 | 35.8 |
| 70% | 2.72 | 44.6 | 44.0 | 19.3 | 32.2 | 31.0 | 87.4 | 44.0 |
| 75% | 3.18 | 52.1 | 51.3 | 21.3 | 34.8 | 34.5 | 100 | 57.4 |
| 80% | 3.89 | 65.5 | 60.6 | 24.9 | 39.8 | 38.7 | 113 | 78.0 |
| 85% | 4.88 | 80.7 | 72.0 | 29.0 | 45.7 | 45.6 | 143 | 98.2 |
| 90% | 5.55 | 103 | 100 | 34.5 | 56.4 | 56.3 | 171 | 143 |
| 95% | 6.66 | 140 | 139 | 75.6 | 80.1 | 76.8 | 240 | 182 |
| 99% | 12.1 | 269 | 268 | 112 | 171 | 172 | 444 | 391 |
| 100% | 18.9 | 282 | 283 | 118 | 198 | 200 | 733 | 446 |
| Share of pages | HOPF | CoreGraphics | PDFKit | PDFium |
|---|---|---|---|---|
| 0% | 0.600 | 2.21 | 2.14 | 1.41 |
| 5% | 0.988 | 4.39 | 4.39 | 3.62 |
| 10% | 1.15 | 5.39 | 5.47 | 4.22 |
| 15% | 1.32 | 6.50 | 6.52 | 5.24 |
| 20% | 1.47 | 9.12 | 9.18 | 6.47 |
| 25% | 1.57 | 14.0 | 14.3 | 7.35 |
| 30% | 1.72 | 18.5 | 18.7 | 8.47 |
| 35% | 1.93 | 23.4 | 24.4 | 9.83 |
| 40% | 2.14 | 27.8 | 28.1 | 11.3 |
| 45% | 2.53 | 31.0 | 32.2 | 12.9 |
| 50% | 3.01 | 34.0 | 35.5 | 14.4 |
| 55% | 3.50 | 38.0 | 40.0 | 15.6 |
| 60% | 4.16 | 46.4 | 46.3 | 17.6 |
| 65% | 4.82 | 50.4 | 50.4 | 20.4 |
| 70% | 5.78 | 53.1 | 53.8 | 23.0 |
| 75% | 6.82 | 62.1 | 61.9 | 26.3 |
| 80% | 8.07 | 75.8 | 75.0 | 30.5 |
| 85% | 9.83 | 93.8 | 94.1 | 35.4 |
| 90% | 12.0 | 118 | 120 | 42.6 |
| 95% | 17.3 | 164 | 163 | 85.5 |
| 99% | 28.9 | 311 | 312 | 119 |
| 100% | 52.0 | 338 | 339 | 141 |
The speedup chart places already-compiled render performance directly beside ratios that include the one-time compile cost. On iPad Pro, HOPF's geometric mean speedup reaches 8.97 times over PDFKit and 4.25 times over PDFium on first draw, rising to 28.7 and 10.8 times on redraw (reaching 117.8 times faster than PDFKit on 1-bit scan redraws). Even when folding each page's share of the compile cost into that first draw, HOPF still beats PDFium by 1.74 times on iPad Pro and 3.15 times on MacBook Pro (and 4.77 times over MuPDF's display-list preparation and first draw on MacBook Pro), while compilation is paid only once per score.
How much faster HOPF draws a page
- Drawing a page
- Counting the one-time compile
| Device and renderer | Drawing a page | Counting the one-time compile |
|---|---|---|
| Mac mini (M4), CoreGraphics | 15.2×, faster on 100% of pages | 6.61×, faster on 97% of pages |
| Mac mini (M4), PDFKit | 15.1×, faster on 100% of pages | 6.58×, faster on 97% of pages |
| Mac mini (M4), PDFium | 6.79×, faster on 100% of pages | 2.95×, faster on 93% of pages |
| Mac mini (M4), MuPDF | 10.3×, faster on 100% of pages | 4.48×, faster on 93% of pages |
| Mac mini (M4), MuPDF, display list | 9.02×, faster on 99% of pages | 4.51×, faster on 94% of pages |
| Mac mini (M4), pdf.js | 27.0×, faster on 100% of pages | 11.7×, faster on 100% of pages |
| Mac mini (M4), Poppler | 18.9×, faster on 100% of pages | 8.21×, faster on 100% of pages |
| MacBook Pro (M5 Pro), CoreGraphics | 15.3×, faster on 100% of pages | 7.00×, faster on 98% of pages |
| MacBook Pro (M5 Pro), PDFKit | 15.0×, faster on 100% of pages | 6.88×, faster on 97% of pages |
| MacBook Pro (M5 Pro), PDFium | 6.87×, faster on 100% of pages | 3.15×, faster on 93% of pages |
| MacBook Pro (M5 Pro), MuPDF | 10.3×, faster on 100% of pages | 4.70×, faster on 94% of pages |
| MacBook Pro (M5 Pro), MuPDF, display list | 9.02×, faster on 99% of pages | 4.77×, faster on 94% of pages |
| MacBook Pro (M5 Pro), pdf.js | 27.8×, faster on 100% of pages | 12.7×, faster on 100% of pages |
| MacBook Pro (M5 Pro), Poppler | 18.9×, faster on 100% of pages | 8.65×, faster on 100% of pages |
| iPad Pro (M4), CoreGraphics | 8.90×, faster on 99.8% of pages | 3.64×, faster on 88% of pages |
| iPad Pro (M4), PDFKit | 8.97×, faster on 99.8% of pages | 3.67×, faster on 88% of pages |
| iPad Pro (M4), PDFium | 4.25×, faster on 100% of pages | 1.74×, faster on 79% of pages |
The cost model translates those medians into cumulative usage across 1, 10, and 100 draws per page, amortizing HOPF's compile overhead across reads. On iPad Pro, HOPF already wins on a page drawn just once (7.33 ms compile included, versus 14.4 ms for PDFium and 35.5 ms for PDFKit). Across 100 draws, HOPF's amortized cost converges to 0.819 ms per draw, compared with 9.79 ms and 29.0 ms.
One compile, many draws
- HOPF, drawing
- HOPF, the compile shared out
Drawn once
Drawn 10 times
Drawn 100 times
Drawn once
Drawn 10 times
Drawn 100 times
Drawn once
Drawn 10 times
Drawn 100 times
| Renderer | Drawn once | Drawn 10 times | Drawn 100 times |
|---|---|---|---|
| HOPF | 3.23 ms | 0.796 ms | 0.553 ms |
| PDFium | 12.2 ms | 9.72 ms | 9.47 ms |
| CoreGraphics | 32.1 ms | 14.9 ms | 13.2 ms |
| PDFKit | 32.2 ms | 15.0 ms | 13.3 ms |
| Renderer | Drawn once | Drawn 10 times | Drawn 100 times |
|---|---|---|---|
| HOPF | 3.13 ms | 0.670 ms | 0.424 ms |
| PDFium | 11.4 ms | 9.06 ms | 8.82 ms |
| CoreGraphics | 30.3 ms | 12.6 ms | 10.9 ms |
| PDFKit | 29.5 ms | 13.0 ms | 11.3 ms |
| Renderer | Drawn once | Drawn 10 times | Drawn 100 times |
|---|---|---|---|
| HOPF | 7.33 ms | 1.41 ms | 0.819 ms |
| PDFium | 14.4 ms | 10.2 ms | 9.79 ms |
| CoreGraphics | 34.0 ms | 29.4 ms | 28.9 ms |
| PDFKit | 35.5 ms | 29.6 ms | 29.0 ms |
That speed advantage translates directly into major power savings, especially on composite pages, 1-bit scans, and JPEG scans. On Mac mini composite pages in 20-second continuous loops, HOPF consumes just 5.05 mJ of CPU energy per page with virtually zero GPU draw, compared with 22.2 mJ for PDFium, 34.5 mJ for MuPDF's display list, and 166 mJ for CoreGraphics; on 1-bit scans, HOPF uses 17.7 mJ against 70.1 mJ for MuPDF's display list and 551 mJ for CoreGraphics. On iPad Pro, where iOS exposes per-process CPU energy counters across all 491 pages, HOPF consumes a mean of 14.1 mJ per redraw versus 78.4 mJ for PDFium and 247 mJ for PDFKit.
Energy to draw a page
- HOPF, CPU
- HOPF, GPU (about)
Composite
JPEG scan
1-bit scan
Vector
Composite
JPEG scan
1-bit scan
Vector
| Renderer | Composite | JPEG scan | 1-bit scan | Vector |
|---|---|---|---|---|
| HOPF | 5.05 CPU and about 0 GPU | 28.0 CPU and about 0.00861 GPU | 17.7 CPU and about 0 GPU | 41.9 CPU and about 0.00837 GPU |
| CoreGraphics | 166 | 50.1 | 551 | 102 |
| PDFKit | 167 | 50.2 | 558 | 187 |
| PDFium | 22.2 | 142 | 114 | 95.8 |
| MuPDF | 34.0 | 135 | 69.9 | 52.8 |
| MuPDF, display list | 34.5 | 132 | 70.1 | 41.0 |
| pdf.js | 26.6 | 128 | 270 | 51.0 |
| Poppler | 135 | 193 | 280 | 139 |
| Renderer | Composite | JPEG scan | 1-bit scan | Vector |
|---|---|---|---|---|
| HOPF | 6.36 CPU and about 0 GPU | 38.9 CPU and about 0 GPU | 17.9 CPU and about 0.000867 GPU | 52.4 CPU and about 0 GPU |
| CoreGraphics | 176 | 57.0 | 572 | 107 |
| PDFKit | 176 | 57.1 | 581 | 195 |
| PDFium | 23.4 | 171 | 142 | 94.2 |
| MuPDF | 41.6 | 149 | 75.4 | 52.1 |
| MuPDF, display list | 41.8 | 153 | 75.3 | 40.6 |
| pdf.js | 28.7 | 136 | 297 | 53.3 |
| Poppler | 143 | 205 | 286 | 152 |
On extreme vector stress pages tested on MacBook Pro (40,000 0.05 pt lines drawn 8000 px wide, a 250,000-segment path, and 3,000 dashed 0.3 pt lines), CoreGraphics failed to finish any of the three within its 90 s timeout.
Correct on every page
HOPF matches multi-renderer visual consensus more closely than any competing PDF renderer tested, finishing the cross-renderer suite with zero crashes, zero hangs, and zero unrendered pages.
We treat the PDF specification, ISO 32000-1, as ground truth and other renderers as independent cross-checks. Where the specification defines page semantics, HOPF Core follows it faithfully; where it leaves rasterization to each implementation, HOPF Core specifies exact pixel-area coverage and locks down every rounding rule. Meanwhile, our Quartz-compatible profile matched Quartz byte for byte across every tested class of 1,000 seeded random cases (rectangle fills, tiny rectangles, clips, triangles, rotation and scale, color spaces, and transparency).
Across 1,968 half-resolution pages (the 90-score library plus four copies), HOPF's mean pixel difference measured 1.89 from MuPDF and 2.11 from Quartz, closer to each than they are to one another (2.74), alongside 2.87 from Ghostscript and 8.02 from Poppler. On targeted conformance suites covering decode arrays, hidden layers, forms, and optional-content images, HOPF agreed with MuPDF, Ghostscript, and Poppler where Quartz alone diverged; CMYK conversion follows ISO 32000-1 §10.3.5. Across the 1,089-PDF pdf.js suite, HOPF recorded zero crashes or hangs and decoded 17,026 of 17,227 streams byte-identical to MuPDF. Exported as vector PDFs and read back, 354 conformance PDFs and 13 tutorial PDFs produced zero differences.
The chart below compares each renderer's 491 outputs on MacBook Pro at half resolution against the per-pixel median of the five other renderer families. HOPF produced the fewest visibly divergent pages, just 69 of 491 (more than 1% of pixels differing by over 32 grey levels), with zero divergent pages across all 85 JPEG scans and all 111 1-bit scans. Its median mean difference was also the lowest at 0.579 on a 0 to 255 scale, ahead of pdf.js (102 pages, 1.05), MuPDF and its display list (117, 0.784), PDFium (187, 0.851), PDFKit (204, 1.33), CoreGraphics (210, 1.33), and Poppler (426, 4.42).
Agreement with the other renderers
Built to be safe
Every PDF is untrusted input. To neutralize malformed or adversarial files before a page is drawn, every reader and decoder inside HOPF is written in custom bounds-checked code spanning PDF syntax, cross-references, object streams, the page tree, stream filters, encryption, content streams, TrueType, CFF, and Type 1 fonts, and JPEG, JPEG 2000, JBIG2, and CCITT images. Structural damage such as broken cross-reference tables or invalid stream lengths is repaired or skipped inline when valid, while ordinary unsupported PDF features within resource budgets fall back safely to the original PDF.
Hard architectural ceilings bound time, memory, and integer range on every draw. Coordinates clamp to about ±262,144 pixels so any pairwise difference fits inside 32 bits and any product inside 64. Curves clamp at 4,096 segments, pages cap at 2²⁰ drawing operations, individual unpacked non-image streams cap at 64 MiB (image streams up to 256 MiB), and all streams across a document share a cumulative unpacking ceiling of at least 8 GiB (2³³ bytes) or 1,032 times the source file size. Coverage calculation is bounded too: when dense edge crossings along a scanline would exceed its budget, the solver switches to a fixed four-band sampling path whose runtime does not depend on crossing count. Crucially, whenever a file or page breaches hard resource or safety ceilings, HOPF stops and explicitly blocks platform PDF fallback rather than handing dangerous input to the OS renderer.
How HOPF contains a hostile PDF
- Any PDF: untrusted
- Syntax and structure: cross-references, object streams, page tree
- Streams: filters, encryption, content streams
- Fonts: TrueType, CFF, Type 1
- Images: JPEG, JPEG 2000, JBIG2, CCITT
- Coordinates: within ±262,144 px
- Drawing operations: 2²⁰ per page
- Curve segments: 4,096 per curve
- Decompressed bytes: ≥ 2³³ per doc (1,032× size)
- Compiled page: ready to draw
- Original PDF or stop: a page goes to the PDF; a document over budget stops, no PDF library either
- Readers and decoders, all bounds-checked: Syntax and structure, Streams, Fonts, Images
- Hard ceilings: Coordinates, Drawing operations, Curve segments, Decompressed bytes
- Any PDF → Readers and decoders, all bounds-checked
- Readers and decoders, all bounds-checked → Hard ceilings
- Hard ceilings → Compiled page
- Readers and decoders, all bounds-checked → Original PDF or stop (damaged or unsupported)
- Hard ceilings → Original PDF or stop (over a ceiling)
We continuously fuzz 13 distinct targets covering the compiled format, PDF interpreter, whole PDF files, stream filters, Type 1 fonts, character maps, shading meshes, the compile journal, JPEG, JPEG 2000, JBIG2, TrueType, and CFF. Six targets employ format-aware mutators, and font fuzzers seed directly from fonts embedded in real PDFs. Any input that crashes, hangs past the 20 s default timeout, or breaches its memory cap is captured, replayed, and minimized. In a recorded 5-minute-per-target run with zero crashes, the JPEG decoder ran 15,352 cases and compiled-file reading and drawing ran 30,110 cases (23,955 drawn to completion). On every PDF case, the fuzzer verifies compiler-to-reader round-trip acceptance, holds the App's CPU drawer byte-for-byte to the CPU reference across whole pages, 2× and 8× tiles, sub-regions, greyscale and color outputs, padded BGRA strides, and exact-length buffer enforcement (refusing a buffer even one byte short), and checks the GPU path on size-selected inputs. Incremental compile journals also validate record hashes and trailer integrity so damaged or forged trailing bytes truncate cleanly back to valid boundaries.
Seventy-two historical inputs that previously crashed, hung, read out of bounds, or inflated memory are preserved as timed regression tests and fuzzer seeds, including 11 decompression bombs such as 650 KB expanding to 640 MB and 7 KB expanding to 4 GB. Under Address Sanitizer, the App's drawer, 17 core security tests, and fixed-seed sweeps of 1,000 PDF mutations, 10,000 JPEG mutations, and 10,000 grey and RGB output mutations completed cleanly with zero findings. Thread Sanitizer detected zero data races with two and three concurrent page drawers running simultaneously. Restoring the original PDF stays memory-bounded as well, peaking at about 420.7 MB across five fresh-process runs.
The fuzzing loop
- Seeds: real PDFs and their fonts
- Mutate: format-aware on 6 targets
- Run a case: 20 s limit, memory cap
- Check every PDF case: round trip, all paths equal
- Catch: crash, hang or memory cap
- Replay and minimize: the smallest failing input
- Regression set: 72 inputs, 11 of them bombs
- 13 targets, from whole PDF files to CFF fonts, fuzzed continuously: Seeds, Mutate, Run a case, Check every PDF case, Catch, Replay and minimize, Regression set
- Seeds → Mutate
- Mutate → Run a case
- Run a case → Check every PDF case
- Run a case → Catch (fails)
- Check every PDF case → Catch (mismatch)
- Catch → Replay and minimize
- Replay and minimize → Regression set
- Regression set → Seeds (seeds the next run)
Security testing ran alongside HOPF development from the first builds, well before internal musician trials. Throughout early milestones, automated audits using OpenAI Daybreak and Anthropic Claude Security examined the parser, compiler, image decoders, GPU execution paths, and compile journal recovery, folding each verified flaw directly into tighter bounds and regression seeds. As structural checks accumulated over successive fix cycles, defects discovered per thousand lines of code fell noticeably. Every HOPF change still passes multi-reviewer automated security checks along with native builds, simulator tests, and sanitizer runs before merging.
Verification methods match each architectural layer. For CueFlip's application-level concurrency and state coordination (cloud synchronization, page-turn orchestration, peer sharing, action permits, and cache or dictionary publication lifecycles), we maintain formal TLA+ specifications backed by 16 passing configurations and 31 required counterexample checks. Within HOPF's native C, Swift, and Metal parsing and rendering core, execution safety relies directly on hard integer arithmetic bounds, custom bounds-checked decoders, continuous structure-aware fuzzing, sanitizer sweeps, and compiler-to-reader byte-level verification.
In real-world execution across the cross-renderer benchmark's 4,500 processes and 24,550 page draw attempts, every renderer finished with zero failures, zero crashes, zero timeouts, and zero pages left undrawn.
Frontier security and penetration testing
Before releasing CueFlip 1.7, we ran a large-scale penetration test against a frozen HOPF baseline after completing a one-week daily rehearsal trial with three musicians (with zero crashes or rendering anomalies) and finishing performance testing. Across 200 context-isolated sandboxes deploying 5,956 agent instances, the test identified 87 distinct security candidates, reproduced 38 runtime bugs on an iOS simulator (including 3 crashes), and landed 61 fixes cleared across 56 automated re-review runs, ending with zero Critical issues and zero CVEs.
Deploying 5,956 agent instances across 200 isolated sessions provided independent path coverage rather than just higher volume. Automated agents explore large native codebases along different trajectories on each run: one session may trace a buried stream pointer chain while another stops at an outer check. Dividing 200 isolated sandboxes across 15 threat categories (five core HOPF compiler, parser, decoder, and GPU suites with 20 independent runs each, plus 10 mobile security suites mapped to 24 OWASP MASVS controls and 129 iOS MASTG checks with 10 runs each) tested the same codebase from separate starting contexts. In validation, 41 of the 87 distinct candidates were reported independently by two or more isolated runs, and 26 of the 38 dynamically reproduced bugs (68.4%) were discovered independently across multiple separate sandboxes.
Found more than once
The workflow divided cleanly across five engineering stages, matching each task to suitable models. In parallel exploration, root coordinator agents (using OpenAI Daybreak and open-weights GLM-5.3) surveyed the codebase against each target and dynamically spawned 5,756 specialized subagents across lexing, font decoding, image codecs, CPU rasterization, Metal GPU paths, and container bounds. Next, report normalization (with Claude Sonnet 5.5) structured raw findings, and static triage (with GPT-6.1 Sol via Codex at maximum reasoning effort) deduplicated raw reports into 87 unique candidates across 15 root-cause groups while ruling out early false positives against source code. Third, dynamic reproduction (with Gemini 4 Carbon on an iOS 27.1 simulator) ran adversarial test inputs against the 81 candidates that static triage kept, isolating 38 runtime bugs while saving crash logs and minimal reproducer cases. The 6 candidates static triage had excluded were re-checked against the same source baseline and confirmed refuted, which resolved all 87 (87 of 87). Finally, unified remediation (through GPT-6.1 Sol) fixed issues across all 15 root-cause groups in 61 code changes, followed by 56 automated re-review runs across four separate review systems, human review, and native and simulator CI suites.
How the penetration test ran
- Coordinator: OpenAI Daybreak, GLM-5.3
- Subagents: fonts, codecs, raster, Metal, bounds
- HOPF engine: 5 categories, 20 runs each
- Mobile security: 10 MASVS categories, 10 runs each
- Normalize: Claude Sonnet 5.5, structured reports
- Static triage: GPT-6.1 Sol in Codex, 87 candidates, 15 root-cause groups, 6 refuted in source
- Reproduce: Gemini 4 Carbon, 81 run on iOS 27.1, 38 runtime bugs, 3 of them crashes
- Fix: GPT-6.1 Sol, 61 code changes
- Review: four review systems, 56 re-review runs, human review and CI
- Parallel exploration in 200 isolated sandboxes, 15 threat categories: Coordinator, Subagents, HOPF engine, Mobile security
- Each sandbox, 200 coordinators and 5,756 subagents in all: Coordinator, Subagents
- Coordinator → Subagents (spawns)
- Each sandbox, 200 coordinators and 5,756 subagents in all → Normalize (findings)
- Normalize → Static triage
- Static triage → Reproduce
- Reproduce → Fix
- Fix → Review
Dynamic testing uncovered edge cases tied directly to compiling PDFs to integer hardware operations and packaging the source file inside a persistent container. Three defects caused direct iOS simulator crashes: self-referential pattern color spaces triggering unbounded stack recursion, chains of 5,000 indirect object streams bypassing single-hop cycle checks, and extreme tiling transform matrices passing outer range checks before hitting a fatal non-finite floating-point-to-integer conversion. Another group involved decoder and compiler memory pre-allocation before budget accounting: malformed JPEG, JPEG 2000, JBIG2, and CCITT fax payloads under 150 bytes declaring huge pixel dimensions, 128 empty progressive scans, or inflated scanline column counts pushed memory by 64 MiB to over 256 MiB before pixel decoding began, alongside unclipped soft-mask layers inside small viewports, deeply nested graphics-state stacks, uncharged cross-reference unpacking, malformed CFF and TrueType tables, and deferred shading budget accounting. Container and runtime tests also hardened embedded source-PDF decompression bomb limits, chunk checksum checks rejecting corrupted payloads that preserve valid footers, compile-journal truncation on damaged trailing bytes, and cache eviction limits during GPU draws.
All 61 fixes landed across HOPF's C, Swift, and Metal pipeline and CueFlip's app integration layer, while 1 scoped boundary needed no code changes and 25 excluded or refuted items were closed. Every crash case, decoder amplification bound, container checksum check, and compiler budget guard now has matching regression tests built from the reproduced simulator inputs, and subsequent CPU-drawer and limit updates passed the exact same continuous fuzzing harness (including the App drawer under Address Sanitizer), Thread Sanitizer sweeps, and automated multi-engine review suites cleanly. Full statistical distributions and severity counts appear in the expandable methodology note below.
What became of the 87 candidates
What validation found
What was done
Methodology, agent telemetry, and full validation breakdown
Campaign coverage and agent trace accounting: All 200 context-isolated penetration testing sessions map cleanly to 15 threat categories: 5 core HOPF engineering categories with 20 independent runs each (100 runs covering memory safety and undefined behavior, hostile input parsing, resource exhaustion, concurrency and lifecycle state, and app integration) and 10 OWASP MASVS/MASTG categories with 10 runs each (100 runs spanning storage, cryptography, auth boundaries, offline and iCloud privacy, iOS platform surfaces, code security, reverse engineering, data minimization, cross-control trust chains, and independent MASTG verification across 24 controls and 129 checks). Across retained run trajectories (event streams cross-verified 200 of 200 against agent state records), telemetry captured 5,956 unique agent instances (200 coordinator root agents and 5,756 dynamically spawned subagents, including multi-level validation descendants), averaging 28.78 subagents per session (29.78 total agents; median 28.5, range 0 to 67, sample standard deviation 12.33, with 8 sessions stopping at coordinator level). Counting all retained trajectories, 115 sessions completed report delivery (3,238 agent instances and 3,123 subagents; 101 sessions or 87.8% surfaced 625 per-run deduplicated reports across 39 core and 62 mobile runs, averaging 6.19 items from 1 to 28, with 0 Criticals and 0 CVEs) while 85 sessions terminated prior to report delivery (2,718 agent instances and 2,633 subagents). These totals count deduplicated instances present in retained traces rather than peak simultaneous concurrency or discarded pre-relaunch retries.
Snapshot triage and rediscovery distribution: The consolidated formal triage snapshot processed 43 finalized runs (37 containing 233 raw reports, averaging 6.3 per yielding run from 1 to 28) into 87 unique security candidates across 15 root-cause families. Static code triage eliminated 6 false positives with source counterevidence and retained 81 items for dynamic verification. Across the 87 candidates, 41 (47.1%, representing 188 of the 233 raw reports) were independently reported by two or more isolated runs, 45 surfaced in a single run, and 1 split during clustering; 26 of the 38 bugs confirmed dynamically on simulation (68.4%) came from multi-session rediscovery.
Validation breakdown, 87 of 87 (81 executed on the iOS 27.1 simulator, 6 static exclusions re-checked in source): Live dynamic execution verified 38 reproducible runtime bugs (17 P1, 14 P2, and 7 P3, including 3 fatal crashes), 13 source-confirmed structural weaknesses verified directly in code (8 P2 and 5 P3), 6 partially mitigated conditional boundaries (1 P1 and 5 P2), 5 standalone library paths with zero app callers (5 P3), 11 low-impact or intentional behaviors matching design limits (1 P1, 3 P2, and 7 P3), and 8 additional candidates disproven dynamically during execution (bringing total false positives eliminated across static triage and dynamic simulation to 14).
Remediation tally and closing review gates: The unified remediation update merged 61 code fixes spanning 18 P1, 27 P2, and 16 P3 validation priorities (7 High, 38 Medium, 13 Low, 2 Informational, and 1 Unclassified on intake severity scales, with 0 Critical exposures and 0 CVEs), confirmed 1 scoped boundary safe unchanged, and closed 25 excluded or refuted items. Pre-merge verification combined 56 automated review runs across four distinct AI security and code review engines (9 deep security verification runs and 41, 5, and 1 passes across three complementary code/regression review engines) with direct human engineer verification and full native, iOS simulator, fuzzer, and sanitizer CI runs.
In CueFlip 1.7
HOPF begins rolling out in staged waves to all users with CueFlip 1.7, taking over the score reader's rendering pipeline and writing both 1-byte greyscale pages and 4-byte BGRA pages directly into application memory through its multi-threaded CPU pipeline, waking the GPU only on demand. Automatic updates arrive progressively in batches through the App Store, while anyone who wants HOPF immediately can update manually in the App Store right away.
Each HOPF container (for source files up to the 512 MiB source archive limit) preserves the original PDF byte for byte while sharing matching compressed image streams directly between drawing payloads and the embedded source archive instead of storing them twice, and every restored PDF verifies against its recorded SHA-256 digest before delivery. For CueFlip 1.7.0 rollout safety and instant compatibility fallback, the app also intentionally retains the original score.pdf beside each converted HOPF container on disk.
For a musician performing on an iPad Pro, HOPF delivers 3.01 ms median first draws, sub-millisecond 0.754 ms median redraws, dramatically lower energy draw across rehearsal, and bit-identical output between Mac and iPad. The instant a foot pedal lands or a finger taps, the next page is already ready.
HOPF started with a focused engineering problem, turning a page of sheet music within a single frame budget, and yielded a general architectural principle. PDFs are imperative programs built for printers, repeating identical setup work on every render. Moving invariant work into a one-time compile and executing the remainder in exact integer arithmetic delivers sub-millisecond redraws, dramatically lower energy, and bit-identical pixels across every tested Apple chip. Any document read far more often than it is written benefits from the exact same compiler.
