[tcpdump-workers] Which is fastest a 32 or 64 bit pcaplib on a 64 bit OS?

Guy Harris guy at alum.mit.edu
Tue Apr 18 14:22:17 EDT 2017

On Apr 11, 2017, at 10:40 AM, Joseph Freemaker <joseph_freemaker at 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.

More information about the tcpdump-workers mailing list