Serialbench

Measurement console · run 2026-10-19

How fast can Ruby read and write your data?

Every XML, JSON, YAML and TOML serializer in the ecosystem, measured on the same workloads across99platform and Ruby 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.250.792.517.9825.4
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 2022
pugixml——————————————————————————————————————————————————————————————————————————————————————16117230815553.4179334321527234350246101
leptris99.932.028.592.017.326.630.226.949.981.917.238.616.00.7229.215.89.4426.998.730.644.342.043.245.249.249.419.444.348.646.261.660.861.468.553.240.838.853.662.368.262.471.463.562.950.348.670.280.785.890.141.630.741.541.876.961.976.882.643.940.520.339.992.386.173.091.143.344.057.146.067.869.068.571.983.315710870.248.848.266.449.085.962.146.863.093.098.346.570.223.037.574.476.511885.879.351.274.3
lxml——————————————————————————————————————————————15.916.218.725.711.49.0111.912.024.410.722.826.112.710.76.3111.026.824.613.834.318.819.117.719.622.522.422.523.719.738.523.419.610.710.312.311.011.911.610.411.9—————————————
ox20.820.521.834.910.86.2610.217.012.923.015.226.38.0511.49.5920.318.014.127.823.318.430.212.516.616.128.512.717.418.327.113.417.414.727.114.915.911.937.312.917.713.727.715.523.613.528.7—————————————————————————————————————————————————————
libxml2——————————————————————————————————————————————————————————————————————————————————————30.09.7628.125.88.8913.121.021.226.023.720.414.213.1
nokogiri26.821.726.58.199.549.6210.212.721.926.713.920.410.213.49.9215.924.221.029.922.622.421.94.5712.011.413.74.2811.78.6413.818.115.514.520.327.412.218.327.117.415.414.020.828.319.718.921.7—————————————————————————————————————————————————————
elementtree——————————————————————————————————————————————5.845.687.469.572.632.464.264.286.725.349.298.373.883.332.623.958.717.376.109.064.174.737.706.486.436.649.029.455.175.157.676.505.444.668.357.604.595.656.588.40—————————————
rexml0.590.410.510.430.110.120.150.140.390.510.310.270.080.150.110.150.350.380.630.270.330.420.290.270.280.300.270.250.290.270.370.340.350.460.370.250.360.330.370.360.370.420.370.410.280.31—————————————————————————————————————————————————————
oga0.580.540.570.510.110.180.230.280.490.580.380.520.120.110.230.220.310.440.600.360.420.510.390.330.390.460.230.330.420.420.400.370.360.450.420.280.370.460.410.370.340.480.440.480.320.45—————————————————————————————————————————————————————
ARM649 libraries · avg best 242 ips
x86_649 libraries · avg best 242 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

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

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 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 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.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 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.7.5

html

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

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.201.2
yeptris-json0.6.7.5
yeptris-yaml0.6.7.5
teptris0.2.36
orjson3.13.0
python-rapidjson1.25

toml

LibraryVersionCommentsArrays of tablesInline tables
tomlkit0.15.2
tomllibstdlib/tomllib

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.