Skip to content

ChiefWoods/math-compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math Compare

Benchmark Solana SBF compute-unit usage across Rust math libraries.

Each math library is tested in its own crate under crates/ so generated svm-unit-test programs only depend on the library being measured.

Libraries

  • fixed
  • rust-decimal
  • hylo-fix
  • spl-math

Running Tests

Run all workspace tests:

just test

Run one library and print only CU readings:

just fixed
just rust-decimal
just hylo-fix
just spl-math

Compare libraries:

just compare fixed rust-decimal hylo-fix spl-math

Or compare between all libraries:

just compare-all

Save comparison output as CSV:

just compare-save fixed rust-decimal hylo-fix spl-math

Compare and save output of all libraries:

just compare-save-all

Notes

Most library crates use upstream svm-unit-test. hylo-fix and spl-math use the local svm-unit-test-std wrapper because their generated SBF tests pull in std, which conflicts with the upstream no-std panic handler.

Contributing

See CONTRIBUTING.md.

About

Benchmark Solana SBF compute-unit usage across Rust math libraries.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors