minicheddar / crypto-stream

High performance market data handlers for cryptocurrency exchanges
MIT License
4 stars 1 forks source link

Compare performance between data types used for Price #10

Open minicheddar opened 1 year ago

minicheddar commented 1 year ago

Rust does not allow ordering of f32/f64s as part of std. This prevents using f64 as a key in BTreeMap<f64, OrderbookLevel>.

For now, we should just use this (https://crates.io/crates/ordered-float), but I'm curious on the performance difference between.

This is definitely a low-priority premature micro-optimisation!