Witold Filipczyk <[EMAIL PROTECTED]> wrote a few months ago:

> I read in the zziplib docs that a conditional call is ten times slower
> than an uncoditional one. Is it true?

Even if it is true for calls to known functions, it might not be
true for calls via function pointers.

> In src/document/html/parser/parse.c (start_element, end_element)
> there are:
> if (ei->open) ei->open()
> and
> if (ei->close) ei->close()
>
> Wouldn't be ELinks faster and simpler if all (close and open) functions
> be defined?

Measure it and see?
Bug 545 comment 8 shows that 78% of time was spent in CSS.
I expect this change would have a negligible effect on speed.

The calls would be a bit simpler, but there are only two of them,
so it doesn't matter much for readability.
However, the elements[] array might become a bit harder to read
if you replaced NULLs with some html_noop function pointers.
Currently, the few html_*_close functions stand out really well.
Anyway, if you want to make this change, it's OK with me.

Attachment: pgpBoq4zCMd1G.pgp
Description: PGP signature

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to