Closed alexzanderr closed 1 year ago
Debug mode and release mode Rust programs use the same standard library build. There is only one standard library and it is release mode. So you are not actually comparing against a debug mode std::fmt implementation. That would be way slower.
Debug mode and release mode Rust programs use the same standard library build.
because std is already compiled right? (its inside the compiler from what i know and i guess already in release mode)
yeah, you answered here: There is only one standard library and it is release mode
So you are not actually comparing against a debug mode std::fmt implementation. That would be way slower.
ok, nice, so ryu is faster in both cases
thanks for response!
when you benched this crate, did you compare it with debug mode
std::fmt or you benched everything in release mode ?
hello.
i have a small simple example of benching with the
std::time::Instant
and the perf ofryu
in debug mode is slower thanstd
, but in release is faster.why? what am i missing? what am i doing wrong (im pretty sure im doing something wrong)
i know the example is not that advanced and doesnt cover all the cases, but it was something made up really quick to try out
ryu
craterunning in
debug
mode:ryu
is slowerrunning in
release
mode:ryu
is faster (which, ofc, is good)my question is why
ryu
in debug mode is slower ?or a better question would be: is
ryu
designed only to be faster in release mode ?