Closed casperisfine closed 6 months ago
It does a call to Dir.pwd which end up being 50% of the runtime. I'll see upstream if perhaps this call could be cached, and also perhaps see in RUby why it's this slow (It's a syscall, but even for a syscall it seems very slow).
Dir.pwd
After:
interp: ruby 3.3.1 (2024-04-23 revision c56cd86388) [arm64-darwin23] yjit: ruby 3.3.1 (2024-04-23 revision c56cd86388) +YJIT [arm64-darwin23] ----- ----------- ---------- --------- ---------- ------------ ----------- bench interp (ms) stddev (%) yjit (ms) stddev (%) yjit 1st itr interp/yjit rack 72.9 4.8 52.8 2.4 1.24 1.38 ----- ----------- ---------- --------- ---------- ------------ -----------
Hum, wait, there's something wrong. That Dir.pwd is in the rack initialize. Seems like the benchmark was wrong all along.
It does a call to
Dir.pwd
which end up being 50% of the runtime. I'll see upstream if perhaps this call could be cached, and also perhaps see in RUby why it's this slow (It's a syscall, but even for a syscall it seems very slow).After: