Skip to content

30% regression in creating string from integer from 1.10.2 to 1.11 #53950

@Zentrik

Description

@Zentrik

On 1.10.2

julia> @benchmark string(1)
BenchmarkTools.Trial: 10000 samples with 995 evaluations.
 Range (min  max):  30.631 ns   2.994 μs  ┊ GC (min  max): 0.00%  96.50%
 Time  (median):     33.159 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   36.987 ns ± 77.616 ns  ┊ GC (mean ± σ):  8.62% ±  4.14%

    ▁▃▅▆██▆▄▂▁                                                ▂
  ▄▇██████████▇▇▇▇▅▅▅▄▅▅▅▄▆▅▅▅▅▅▅▅▅▅▅▅▅▆▅▄▅▅▅▆▆▅▄▅▂▅▅▅▅▅▄▄▅▄▄ █
  30.6 ns      Histogram: log(frequency) by time      51.7 ns <

 Memory estimate: 88 bytes, allocs estimate: 2.

And on 1.11.0-alpha2

julia> @benchmark string(1)
BenchmarkTools.Trial: 10000 samples with 991 evaluations.
 Range (min  max):  41.866 ns   13.625 μs  ┊ GC (min  max):  0.00%  99.15%
 Time  (median):     44.646 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   68.537 ns ± 309.203 ns  ┊ GC (mean ± σ):  12.39% ±  2.96%

  ▃▄█▆▃                                        ▁▃▃▄▄▅▄▄▃▃▂▁▁   ▂
  ██████▇▆▆▅▅▆▅▇▆▆▇▅▅▅▆▄▅▁▄▅▁▃▁▁▁▁▁▁▁▃▃▄▃▃▃▃▁▆███████████████▇ █
  41.9 ns       Histogram: log(frequency) by time      95.9 ns <

 Memory estimate: 88 bytes, allocs estimate: 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceMust go fasterregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions