On Fri, 5 Dec 2003, Johannes Hofmann wrote:
Hi Jorge,
On Thu, Dec 04, 2003 at 10:43:34AM -0300, Jorge Arellano Cid wrote:
I could not yet get any reproducible results from profiling,
!?
Doesn't it show any function usage-ratio/run-time change?
Ok, I redid the profiling on my slower Linux box with utilities.html.
Html_cleanup_tag is called more often in cvs version (16742 vs. 10749) and seems quite a bit slower than in 0.7.3.
See gprof output below. [...]
This is one of those weird situations that computer programming has. If we had been working for a year to make rendering three times faster, and succeeded on the effort, it'd be regarded as a substantial achievement. Actually we had been working for four years to get every bit of speed we can into dillo, and a library upgrade that makes dillo three times slower, is unacceptable. Now, all of a sudden, rendering went three times slower because of some unknown reasons, after applying a simple patch. Profiling revealed that Html_cleanup_tag() was to blame, _but_ that function is identical in both versions! Who's to blame? The compiler, the CPU cache, the pipeline, memory handling, page faults, ... All of them? I made a guess based on our C code, rearranged it and voila!, the former performance is back. Weird world, isn't it? What should have a minor impact on performance (a few CPU cycles overhead) exceeded 0(n) algorithms by a factor of two. :-o It seems that detailed knowledge of the underlying layers plays a significant role in the overall performance of a program. This may seem obvious, but remember that the academy teachs the opposite. Caveat emptor! Patch commited. Cheers Jorge.-