Closed casperisfine closed 4 months ago
Thanks Jean. We still get very little speedup. Is rack mostly a native gem?
Is rack mostly a native gem?
No, it's pure Ruby. But it doesn't do a whole lot except simple method calls and hash lookups.
I'll profile it.
Lol:
I'll see if this Dir.pwd
is strictly required. Or maybe just remove that middleware.
Figured it out: https://github.com/Shopify/yjit-bench/pull/299
Currently the rack benchmark really doesn't do a whole lot. It's a single rack application with just the rack router, so it's basically a handful of method calls and hash lookups.
Even on the interpreter, it's ~40ms for 10k requests per iteration, that's really not a whole lot of code to exercise for a benchmark.
By adding a bunch more standard middlewares that most applications in the while actually do run, we can make the benchmark a bit more relevant.
Before:
After: