Skip to content

Instantly share code, notes, and snippets.

@lambda-fairy
Created January 29, 2015 08:00
Show Gist options
  • Select an option

  • Save lambda-fairy/870954441214c15770bb to your computer and use it in GitHub Desktop.

Select an option

Save lambda-fairy/870954441214c15770bb to your computer and use it in GitHub Desktop.
to_string() benchmarks

Before:

running 4 tests
test empty_str_to_string ... bench:        32 ns/iter (+/- 3)
test i32_to_string       ... bench:        81 ns/iter (+/- 1)
test long_str_to_string  ... bench:        93 ns/iter (+/- 1)
test short_str_to_string ... bench:        75 ns/iter (+/- 0)

test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured

After:

running 4 tests
test empty_str_to_string ... bench:        10 ns/iter (+/- 1)
test i32_to_string       ... bench:        83 ns/iter (+/- 3)
test long_str_to_string  ... bench:        46 ns/iter (+/- 1)
test short_str_to_string ... bench:        29 ns/iter (+/- 1)

test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment