Extract text, macOS
8 public documents, 31 MiB, 1,298 pages: the ISO 32000-1 specification, IRS Publication 17 and form 1040, two arXiv papers, Free Culture and two papers from the pdf.js test suite (fetch-corpus.sh)
- Hypapdf282.9 ms, best
- PDFium (PDFiumCore)1,503 ms, 5.3×
- PdfPig2,052.9 ms, 7.3×
- iText3,057 ms, 11×
- Docnet (PDFium)3,213.5 ms, 11×
| Case | Time | Allocated | Peak RSS |
|---|---|---|---|
| Hypapdf | 282.9 ms | 79.5 MB | 138.4 MB |
| PDFium (PDFiumCore) | 1,503 ms | 8.4 MB | 140.5 MB |
| PdfPig | 2,052.9 ms | 2,570.2 MB | 269.5 MB |
| iText | 3,057 ms | 6,855.6 MB | 395.3 MB |
| Docnet (PDFium) | 3,213.5 ms | 16.3 MB | 177.2 MB |
- Hardware
- Apple M1 Max (10 cores), 64 GB, macOS 26
- Runtime
- .NET 10 (SDK 11.0.100)
- Compared with
- Hypapdf 0.1.0, PdfPig 0.1.16, PDFiumCore 4688 (pdfium-binaries 160.0.8193), Docnet.Core 2.6.0, iText 9.8.1, PDFsharp 6.2.4
- Method
- Each library runs in its own process and reads the documents one after another on one thread; the time is the best of several passes. Allocated is managed memory allocated during the run; peak RSS is the peak resident set size of the process, including the runtime and native code.
- With pages in parallel on every core (MaxDegreeOfParallelism = 0), Hypapdf takes 85.3 ms, allocates 93.0 MB and peaks at 176.2 MB RSS.
- MuPDF.NET ships no macOS arm64 binaries and is measured on Linux only.
- PDFium and Docnet allocate little managed memory because their work happens in native code; peak RSS includes it.
- Hypapdf, PdfPig, iText and PDFium return the same amount of text (3.24 million non-whitespace characters, within 0.1%).
- The machine was running other work (load average 7 to 13) during the runs. Every library ran under the same load, and the ratios held across reruns.
cd dotnet/benchmarks && ./fetch-corpus.sh && ./run.sh --runs 7