You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using BenchmarkTools
s ="elephant giraffe antelope lion cheetah, "^1000;
const reg =r"elephant|giraffe|antelope|lion|cheetah"const rep =Dict("elephant"=>"grey", "giraffe"=>"yellow", "antelope"=>"brown", "lion"=>"gold", "cheetah"=>"yellow")
@btimereplace($s, $(reg=>(s->rep[s])));
on Julia 1.8.2 gives (on my x86_64 laptop):
649.743 μs (4 allocations: 47.19 KiB)
but on master (1.10.0-DEV.551) gives:
790.071 μs (4 allocations: 47.19 KiB)
a 20% slowdown.
The other benchmark @btime replace($s, "elephant"=>"grey", "giraffe"=>"yellow", "antelope"=>"brown", "lion"=>"gold", "cheetah"=>"yellow"); in that issue is actually 10% faster on master, so it's not all bad news.
This regex benchmark from #40484 (comment):
on Julia 1.8.2 gives (on my x86_64 laptop):
but on
master
(1.10.0-DEV.551) gives:a 20% slowdown.
The other benchmark
@btime replace($s, "elephant"=>"grey", "giraffe"=>"yellow", "antelope"=>"brown", "lion"=>"gold", "cheetah"=>"yellow");
in that issue is actually 10% faster onmaster
, so it's not all bad news.cc @vtjnash
The text was updated successfully, but these errors were encountered: