tree: f6d18a58d8edd8343ed424bb7efd94e7eea32e79 [path history] [tgz]
  1. apidoc/
  2. c/
  3. python/
  4. .gitignore
  5. asv.conf.json
  6. benchmark-report.qmd
  7. benchmark-run-all.sh
  8. benchmarks.Rproj
  9. CMakeLists.txt
  10. CMakePresets.json
  11. generate-fixtures.py
  12. meson.build
  13. README.md
dev/benchmarks/README.md

Benchmarking nanoarrow

This subdirectory contains benchmarks and tools to run them. This is currently only implemented for the C library and Python bindings but may expand to include the R bindings as well.

C Library

The structure of the C benchmarks is as follows:

  • Benchmarks are documented inline using Doxygen.
  • Configurations are CMake build presets, and CMake handles pulling a previous or local nanoarrow using FetchContent. Benchmarks are run using ctest.
  • There is a bare-bones report written as a Quarto document that renders the C library results to markdown.

You can run benchmarks for a single configuration (e.g., local) with:

mkdir build && cd build
cmake .. --preset local
cmake --build .
ctest

The provided benchmark-run-all.sh creates (or reuses, if they are already present) build directories in the form build/<preset> for each preset and runs ctest.

You can build a full report by running:

python generate-fixtures.py # requires pyarrow
./benchmark-run-all.sh
cd apidoc && doxygen && cd ..
quarto render benchmark-report.qmd

Python bindings

The Python benchmarks are a standard asv project. You can run the benchmarks with:

# pip install asv
python generate-fixtures.py # requires pyarrow
asv run