> > wow. template toolkil took a big hit, there. (no mod_perl on
> > this list? hmm!)
>
> This benchmark can be very non-representive. If you don't know how to
> optimize each and every "thing" under test, you end up with unfair
> benchmark and come to potentially wrong conclusions. Take TT, add compiled
> template caching on the disk and shared TT object and I bet TT won't be at
> the bottom.

I actually helped Joshua tune the TT example a little, and it using a cached
Template object and caching the templates used in the test in memory.  The
"slowness" comes from the fact that it provides a major feature that the
others don't, and it is being exercised in this test.  The magic dot
notation which allows templates to say foo.bar.baz, regardless of what kind
of data structure, object, or code ref "foo", "bar", and "baz" may be takes
a little more work.  Whether it's a good idea or not is left as an exercise
to the reader, but I will say this: if Template Toolkit is the bottleneck in
your app's performance, you have either done some serious tuning or written
a really simple application (like this benchmark).

Nevertheless, it's good to see some numbers, if only to convince Andy to
finish his optimized XS version of the TT stash.

- Perrin

Reply via email to