Table Benchmark

This benchmark tests the performance of table implementations.

Benchmark Setup

A simple table with three columns (text, image, text) and varying number of rows is laid out, using the available table implementation together with automatic page breaking.

Each benchmark script can be invoked standalone in the following way: script-executable NR_ROWS IMAGE_FILE OUTPUT_FILE.

The list of the benchmarked libraries:


Language: Ruby
Version: Latest version


Language: Ruby
Version: 2.4.0

Prawn’s table implementation is available in the separate gem prawn-table.


Language: Python
Version: 3.6.12


Language: Python
Version: 2.7.4


These benchmark results are from 2023-08-03.

benchmark graphic

    Time Memory File size
hexapdf 10 226ms 37.488KiB 22.159
prawn 10 206ms 35.968KiB 22.146
reportlab 10 107ms 29.780KiB 22.007
fpdf2 10 171ms 48.648KiB 21.970
hexapdf 100 276ms 41.500KiB 26.904
prawn 100 327ms 40.192KiB 33.825
reportlab 100 117ms 30.168KiB 28.077
fpdf2 100 196ms 48.776KiB 29.703
hexapdf 1000 501ms 51.284KiB 73.909
prawn 1000 1.356ms 75.520KiB 151.129
reportlab 1000 224ms 32.340KiB 88.365
fpdf2 1000 453ms 49.948KiB 106.353
hexapdf 10000 2.653ms 151.316KiB 546.297
prawn 10000 13.047ms 405.996KiB 1.339.194
reportlab 10000 3.837ms 55.144KiB 697.027
fpdf2 10000 3.052ms 61.820KiB 876.678