tcpdump mailing list archives

Re: Which is fastest a 32 or 64 bit pcaplib on a 64 bit OS?


From: Guy Harris <guy () alum mit edu>
Date: Tue, 18 Apr 2017 11:22:17 -0700

On Apr 11, 2017, at 10:40 AM, Joseph Freemaker <joseph_freemaker () yahoo com> wrote:

On a 64 bit OS does a 64 bit compiled libpcap provide better performance than a 32 bit compiled libpcap?

I don't know whether anybody's measured it on any particular platforms.

A 64-bit libpcap would have bigger pointers and size_t variables, which might increase its memory and cache footprint, 
possibly slowing it down.

However, there might also be some extra overhead due to translation of 32-bit pointer and size arguments in system 
calls.

And, if the platform happens to be x86 or ARM, 32-bit code has fewer registers available than 64-bit code (unless the 
compiler and OS support a "64-bit instruction set but with 32-bit pointers" mode; I think there's something like that 
for Linux on x86, for example).

So, without a measurement, I'm not going to try to guess which will offer better performance.  If your later question 
about AIX indicates that you're running AIX 6, that means it's on a Power ISA machine, so the "fewer registers can slow 
down 32-bit code" part won't apply.

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: