On Wed, 18 Feb 2004, [iso-8859-2] Hrvoje Nik?i? wrote: > Good point, I really should back up such a claim with numbers. I > originally didn't go out of my way to make Htmltemplate very fast, I > simply coded it the "obvious" way. But then I did some benchmarks > and, to my surprise, found it to be a good deal faster than I > expected. The benchmark was admittedly *very* simple-minded: take a > template, compile it once, and run the template transformation over > and over to see how many transformations per second I can squeeze.
What kind of complexity did you put into your test template? I've found that deep loops with plenty of IF/ELSE logic are a good way to stress HTML::Template. > The code generated by HTML::Template::JIT still contains calls to > Perl's library and object system, doesn't it? To me that's quite > different from typical hand-written C code, which I'd expect to always > beat Java by a wide margin. It makes a few, mostly to get param values from SVs, but it makes a lot fewer than you might imagine. The template text itself and all the branching and looping logic is compiled into pure C code. > How do you benchmark HTML::Template::JIT? I can try to repeat the > same benchmark with Free Htmltemplate to see if I still get the > speedup I got when I last compared them. I use a script called benchmark.pl in the scripts/ directory of the HTML::Template::JIT distribution. It uses Benchmark.pm in a fairly standard fashion. If I wanted to run some benchmarks with your code what JVM should I use? I think I have some version of Sun's 1.4 JRE installed but I seem to remember something about it not being very fast. -sam ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users