nolate icon indicating copy to clipboard operation
nolate copied to clipboard

Proper benchmark

Open judofyr opened this issue 14 years ago • 1 comments

Two commits:

Use benchmark.rb

There's a reason we have benchmark.rb in stdlib. This commit simply uses the Benchmark#bmbm method which ensures that the garbage collector doesn't affect the code unfairly (e.g. one benchmark allocates lots of objects, but they're collected in the next benchmark).

Compare against Erubis

It seems to me that you're aiming for some super fast template engine, so I think it's fair to compare it with Erubis. This includes a commit that shows that Erubis is 5-10 times faster than Nolate when caching the template (which is the common case for all frameworks in Ruby).

judofyr avatar Apr 20 '11 10:04 judofyr

For your information, I've also seen that Erubis is faster than nolate on a real example. Slide-em-up used with these slides took more than 3s with nolate and 1.6s with erubis (the template is used only one time, so no caching is possible).

nono avatar Apr 20 '11 13:04 nono