Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Rack::Static from rack benchmark #298

Closed
wants to merge 1 commit into from
Closed

Conversation

casperisfine
Copy link
Contributor

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:

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       
-----  -----------  ----------  ---------  ----------  ------------  -----------

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).
@casperisfine
Copy link
Contributor Author

Hum, wait, there's something wrong. That Dir.pwd is in the rack initialize. Seems like the benchmark was wrong all along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants