Spreadsheet Benchmark Results
Review disclosed reference measurements, understand what they do and do not prove, and reproduce PHP Excel benchmarks on your own environment.
Updated
PHP 8.1+ReproducibleEnvironment qualified
Available sincev2.0.5Version guide
What you will learn
- Interpret elapsed time and peak memory without treating one machine as universal truth.
- Separate streaming behavior from full-array materialization.
- Re-run the provided benchmark in a fresh PHP process.
Reference documentation run#
Reference environment
- Date
- 2026-07-30
- PHP
- 8.4.16 CLI, NTS
- MNB source
- Core 2.0.1 XML fix + XLSX 2.0.0 parser
- Extensions
- XMLReader off, native ZipArchive off; library fallbacks active
- Fixture
- large-orders.xlsx, 500 data rows, 22,629 bytes
- Iterations
- 9 per mode; median reported
- Storage
- Container local filesystem
| Method | Rows | Median time | Peak memory | Notes |
|---|---|---|---|---|
rows() | 500 | 37.512 ms | 18 MiB | Forward iteration; no final row array retained. |
toArray() | 500 | 37.298 ms | 18 MiB | Small fixture; collected rows did not exceed allocator baseline. |
These numbers describe one disclosed environment and fixture. They are not a universal performance guarantee. Re-run the included script on your PHP version, hardware, storage, workbook, and options.
What this result means#
- It confirms both reader paths completed the same 500-row fixture in the disclosed fallback environment.
- It does not prove that one method is always faster; this fixture is too small for broad conclusions.
- Streaming becomes more important when retained row data, shared strings, formulas, styles, or business transformations grow.
- Later v2.0 maintenance releases changed sheet utilities, diagnostics, error rendering, and structured counts rather than the core worksheet parser used here.
Continue with the detailed benchmark#
RESULTLarge XLSX reading result
See the exact command, fixture, metrics, and interpretation for rows() and toArray().
→METHODBenchmark methodologyControl versions, processes, cache state, fixtures, metrics, and result disclosure.
→COMPAREMNB vs PhpSpreadsheetUse the neutral comparison guide and run both libraries on the same environment.
→Was this guide useful?Use GitHub issues for corrections, missing examples, or unclear behavior.
Open an issue