Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Startup speed up - assembler usage

From: "Fulko Hew" <fulko.hew@xxxxxxxxx>
Date: Wed, 7 Nov 2007 08:33:48 -0500


On Nov 7, 2007 8:20 AM, Kukosa, Tomas <tomas.kukosa@xxxxxxxxxxx> wrote:

profiling startup sequence (in Windows environment) the result is that writing few small functions in assembler could speeded it up visibly.
My idea is to have some code pieces written in C but optionally written in assembler for some OSs a CPU/platforms where it make sence.

E.g. I was able (with about 80 lines in assembler) to reduce time spent in libwireshark.dll during startup from cca 2600ms to 1300ms on my PC.

What dou you think about this way? I have good experince with it from some past projects.

My general approach is: IF it speeds up run time, AND its causing me grief,
AND I've thought about it 6 million times first, then I MIGHT consider
re-writing a portion in assembler.

But to save one second (out of how many?), during startup only,
is probably not worth reducing the portability. IMHO

Right now, I've just ported/build wireshark for an embedded  PPC
based device... who'd write the assembler for that?  ;-()