Serialbench

Measurement console · run 2026-10-23

How fast can Ruby, Python, and C read and write your data?

Every XML, JSON, YAML and TOML serializer in the ecosystem, measured on the same workloads across106platform and runtime combinations. Pick a format, pin a reference, and read the field.

Runtime
Format
Operation
Input size
Capabilities
lxmlxpathstreamingnamespaces
elementtreestreamingnamespaces

Field ranking — iterations per second, higher is better

macOS 26 · arm64 · Ruby 3.2 · Parse · large input

large medium small
0.501.856.8525.393.5
vs ref

Cross-environment — same benchmark, every platform at once

Heat intensity = relative speed within each library's row. Group columns by:

Library ARM64macOS 14ARM64macOS 14ARM64macOS 14ARM64macOS 14x86_64macOS 15 Intelx86_64macOS 15 Intelx86_64macOS 15 Intelx86_64macOS 15 IntelARM64macOS 15ARM64macOS 15ARM64macOS 15ARM64macOS 15x86_64macOS 26 Intelx86_64macOS 26 Intelx86_64macOS 26 Intelx86_64macOS 26 IntelARM64macOS 26ARM64macOS 26ARM64macOS 26ARM64macOS 26ARM64Windows 11 ARMARM64Windows 11 ARMx86_64Windows 2022x86_64Windows 2022x86_64Windows 2022x86_64Windows 2022x86_64Windows 2025x86_64Windows 2025x86_64Windows 2025x86_64Windows 2025ARM64Ubuntu 22.04 ARMARM64Ubuntu 22.04 ARMARM64Ubuntu 22.04 ARMARM64Ubuntu 22.04 ARMx86_64Ubuntu 22.04x86_64Ubuntu 22.04x86_64Ubuntu 22.04x86_64Ubuntu 22.04ARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMx86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Ubuntu 24.04ARM64macOS 14ARM64macOS 14ARM64macOS 14ARM64macOS 14x86_64macOS 15 Intelx86_64macOS 15 Intelx86_64macOS 15 Intelx86_64macOS 15 IntelARM64macOS 15ARM64macOS 15ARM64macOS 15ARM64macOS 15x86_64macOS 26 Intelx86_64macOS 26 Intelx86_64macOS 26 Intelx86_64macOS 26 IntelARM64macOS 26ARM64macOS 26ARM64macOS 26ARM64macOS 26x86_64Ubuntu 22.04x86_64Ubuntu 22.04x86_64Ubuntu 22.04x86_64Ubuntu 22.04ARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMx86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Windows 2022x86_64Windows 2022x86_64Windows 2022x86_64Windows 2022x86_64Windows 2025x86_64Windows 2025x86_64Windows 2025x86_64Windows 2025ARM64macOS 15ARM64macOS 15ARM64macOS 26ARM64macOS 26x86_64macOS 26 Intelx86_64macOS 26 IntelARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMx86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Ubuntu 22.04x86_64Ubuntu 22.04x86_64Windows 2022ARM64macOS 26ARM64macOS 26ARM64Ubuntu 24.04 ARMARM64Ubuntu 24.04 ARMx86_64Ubuntu 24.04x86_64Ubuntu 24.04x86_64Windows 2025
pugixml——————————————————————————————————————————————————————————————————————————————————————18920628620910988.6344324508252213263103———————
leptris54.631.534.290.822.430.017.428.760.618.539.786.026.626.027.730.589.095.440.692.551.948.140.367.739.840.453.643.339.543.358.453.254.457.438.571.933.838.658.557.254.158.549.179.946.460.586.482.238.676.931.021.039.535.384.063.977.685.239.638.737.130.565.280.090.895.242.668.513456.659.184.563.759.580.096.281.458.663.585.945.150.283.848.248.742.286.343.352.289.630.520.766.671.391.352.459.270.868.745.392.338.887.842.214741.9
ox10.722.426.340.36.419.789.9021.123.223.89.0936.24.939.4511.521.814.024.920.542.519.129.912.910.417.628.417.215.616.026.613.418.716.227.211.222.413.724.213.217.613.827.312.113.312.442.2————————————————————————————————————————————————————————————
nokogiri24.524.921.830.013.714.78.8815.821.725.014.923.712.810.413.317.030.528.418.737.122.421.96.0116.212.013.67.3910.811.413.418.415.918.120.717.822.119.120.317.615.514.17.7116.721.119.033.5————————————————————————————————————————————————————————————
lxml——————————————————————————————————————————————25.024.317.021.71.746.6912.510.922.420.323.524.911.511.311.68.5617.917.026.926.021.526.734.527.422.522.022.421.521.422.120.221.312.012.310.210.613.011.210.910.4————————————————————
libxml2——————————————————————————————————————————————————————————————————————————————————————21.920.433.030.28.095.3420.121.815.415.116.721.213.5———————
elementtree——————————————————————————————————————————————6.886.807.578.400.600.584.043.926.864.249.3610.23.223.514.353.655.106.469.037.944.817.608.228.416.006.578.987.884.304.547.516.496.516.067.366.924.455.486.137.18————————————————————
oga0.440.480.520.720.210.250.170.290.430.510.370.500.220.230.240.330.750.670.320.740.440.510.380.480.370.480.410.360.400.410.430.410.340.530.320.430.300.390.430.360.350.460.420.540.280.49————————————————————————————————————————————————————————————
rexml0.420.410.410.530.150.180.100.180.410.350.280.490.150.160.130.190.630.550.290.610.350.370.290.410.280.340.370.260.370.320.370.350.410.390.250.390.270.260.370.350.360.370.350.510.270.37————————————————————————————————————————————————————————————
ARM649 libraries · avg best 259 ips
x86_649 libraries · avg best 220 ips

Consistency across input sizes — log scale

A library that wins at every size is a safe default; one that wins only at large fits that workload.

Memory — large input, lower is better

Solid: allocated during operation · outline: retained afterwards

  • leptris864 B
  • ox23.8 MB
  • nokogiri54.0 MB
  • rexml181.1 MB
  • oga310.9 MB
Cite this
“leptris parses large XML 2.9× faster than nokogiri on macOS 26 · arm64 · Ruby 3.2 — serialbench, 2026-10-23”

Will it run on my stack — coverage across measured environments

Derived from the runs themselves: a dot means the library loaded and completed the benchmark on that platform.

LibrarymacOS 26arm64 · 3.2macOS 26arm64 · 3.3macOS 26arm64 · 3.4macOS 26arm64 · 4.0macOS 26arm64 · 3.10macOS 26arm64 · 3.11macOS 26arm64 · 3.12macOS 26arm64 · 3.13macOS 26arm64 · clangmacOS 26arm64 · gccmacOS 26arm64 · 24.21.0macOS 26arm64 · 1.99.1macOS 26 Intelx64 · 3.2macOS 26 Intelx64 · 3.3macOS 26 Intelx64 · 3.4macOS 26 Intelx64 · 4.0macOS 26 Intelx64 · 3.10macOS 26 Intelx64 · 3.11macOS 26 Intelx64 · 3.12macOS 26 Intelx64 · 3.13macOS 26 Intelx64 · clangmacOS 26 Intelx64 · gccmacOS 15arm64 · 3.2macOS 15arm64 · 3.3macOS 15arm64 · 3.4macOS 15arm64 · 4.0macOS 15arm64 · 3.10macOS 15arm64 · 3.11macOS 15arm64 · 3.12macOS 15arm64 · 3.13macOS 15arm64 · clangmacOS 15arm64 · gccmacOS 15 Intelx64 · 3.2macOS 15 Intelx64 · 3.3macOS 15 Intelx64 · 3.4macOS 15 Intelx64 · 4.0macOS 15 Intelx64 · 3.10macOS 15 Intelx64 · 3.11macOS 15 Intelx64 · 3.12macOS 15 Intelx64 · 3.13macOS 14arm64 · 3.2macOS 14arm64 · 3.3macOS 14arm64 · 3.4macOS 14arm64 · 4.0macOS 14arm64 · 3.10macOS 14arm64 · 3.11macOS 14arm64 · 3.12macOS 14arm64 · 3.13Windows 2025x64 · 3.2Windows 2025x64 · 3.3Windows 2025x64 · 3.4Windows 2025x64 · 4.0Windows 2025x64 · 3.10Windows 2025x64 · 3.11Windows 2025x64 · 3.12Windows 2025x64 · 3.13Windows 2025x64 · 24.22.1Windows 11arm64 · 3.4Windows 11arm64 · 4.0Windows 2022x64 · 3.2Windows 2022x64 · 3.3Windows 2022x64 · 3.4Windows 2022x64 · 4.0Windows 2022x64 · 3.10Windows 2022x64 · 3.11Windows 2022x64 · 3.12Windows 2022x64 · 3.13Windows 2022x64 · gccUbuntu 24.04x64 · 3.2Ubuntu 24.04x64 · 3.3Ubuntu 24.04x64 · 3.4Ubuntu 24.04x64 · 4.0Ubuntu 24.04x64 · 3.10Ubuntu 24.04x64 · 3.11Ubuntu 24.04x64 · 3.12Ubuntu 24.04x64 · 3.13Ubuntu 24.04x64 · clangUbuntu 24.04x64 · gccUbuntu 24.04x64 · 24.21.0Ubuntu 24.04x64 · 1.99.1Ubuntu 24.04arm64 · 3.2Ubuntu 24.04arm64 · 3.3Ubuntu 24.04arm64 · 3.4Ubuntu 24.04arm64 · 4.0Ubuntu 24.04arm64 · 3.10Ubuntu 24.04arm64 · 3.11Ubuntu 24.04arm64 · 3.12Ubuntu 24.04arm64 · 3.13Ubuntu 24.04arm64 · clangUbuntu 24.04arm64 · gccUbuntu 24.04arm64 · 24.21.0Ubuntu 24.04arm64 · 1.99.1Ubuntu 22.04x64 · 3.2Ubuntu 22.04x64 · 3.3Ubuntu 22.04x64 · 3.4Ubuntu 22.04x64 · 4.0Ubuntu 22.04x64 · 3.10Ubuntu 22.04x64 · 3.11Ubuntu 22.04x64 · 3.12Ubuntu 22.04x64 · 3.13Ubuntu 22.04x64 · clangUbuntu 22.04x64 · gccUbuntu 22.04arm64 · 3.2Ubuntu 22.04arm64 · 3.3Ubuntu 22.04arm64 · 3.4Ubuntu 22.04arm64 · 4.0
cbor
cbor2
elementtree
jansson
json
json-c
leptris
leptris-whatwg
libcbor
libxml2
libxslt
libyaml
lxml
lxml-html
nlohmann-json
nokogiri
oga
oj
orjson
ox
psych
pugixml
python-rapidjson
pyyaml
rapidjson
rapidyaml
rexml
saxon-he
simdjson
teptris
tinycbor
toml-rb
tomlc17
tomlib
tomlkit
tomllib
tomlrb
yajl
yeptris
yeptris-cbor
yeptris-json
yeptris-yaml

Feature comparison — what each API offers, beyond speed

Capabilities declared by the adapters · all libraries benchmark DOM-style parsing; a StAX column appears when a binding exposes a pull API.

cbor

LibraryVersionStreaming (SAX)
cbor2unknown
cbor0.5.10.3
yeptris-cbor0.6.38.0

html

LibraryVersionXPath
saxon-heunknown
lxml-html6.1.3
leptris-whatwg1.9.381.0

json

LibraryVersionStreaming (SAX)StAX (pull)XPathNamespacesValidationPretty printSymbol keysCustom typesCommentsArrays of tablesInline tablesMultiline strings
rexml3.4.4
ox2.14.29
nokogiri1.19.4
oga3.5
json3.1.0
oj3.17.7
rapidjson0.4.0
yajl1.4.3
psych5.3.1
toml-rb6.0.0
tomlib0.7.3
tomlrb3.0.0
leptris1.9.381.0
yeptris-json0.6.38.0
yeptris-yaml0.6.38.0
teptris0.3.6.3
orjson3.13.0
python-rapidjson1.25

toml

LibraryVersionCommentsArrays of tablesInline tables
tomlkit0.15.2
tomllibstdlib/tomllib
yeptris0.1.0

xml

LibraryVersionStreaming (SAX)StAX (pull)XPathNamespacesValidation
lxml6.1.3
elementtreestdlib

yaml

LibraryVersionStreaming (SAX)
pyyaml6.0.3+libyaml

Raw data

Full results per environment and the complete resultset are exported as YAML alongside this site —data/<environment>.yamlanddata/resultset.yaml. Re-run any leg withserialbench environment executeusing the configs in the repository.