Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Unverified Commit d44a61f8 authored by TSUYUSATO Kitsune's avatar TSUYUSATO Kitsune Committed by GitHub
Browse files

Improve `Int#to_s(base: 10)` performance (~10%) (#9832)

Benchmark is [here](https://gist.github.com/MakeNowJust/2128ff45f232bea179d711b0788052ff),
and its result is:

```
     to_s  31.22k ( 32.03µs) (± 1.14%)  31.3kB/op   1.11× slower
fast_to_s  34.52k ( 28.97µs) (± 0.72%)  31.3kB/op        fastest
```

The basic idea comes from "[Three Optimization Tips for C++](https://www.slideshare.net/andreialexandrescu1/three-optimization-tips-for-c)".
parent 070cc734
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment