You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Software versions of OpenWrt/LEDE release, packages, etc.
18.06.1
Steps to reproduce
Well, the simple way is to cross compile anything that uses a pattern like
memcmp(a,b,c) != 0 // (or ==) and count up the memcmps via objdump.
The != or == pattern gets substituted for a string of xors and a final or, which
is way faster than memcmp can ever be. It was added to gcc 7.
I was building the babel daemon and wondering why my x86_64 compiler was doing
the right thing but not the mips compiler of the same era.
memcmp is pretty expensive for 16 byte (ipv6 prefixes) compares especially when
you only care about equal or not equal. Code's usually smaller too. Nothing faster than xor exists.
The text was updated successfully, but these errors were encountered:
dtaht:
Supply the following if possible:
mips, probably everything except x86_64.
18.06.1
Well, the simple way is to cross compile anything that uses a pattern like
memcmp(a,b,c) != 0 // (or ==) and count up the memcmps via objdump.
The != or == pattern gets substituted for a string of xors and a final or, which
is way faster than memcmp can ever be. It was added to gcc 7.
I was building the babel daemon and wondering why my x86_64 compiler was doing
the right thing but not the mips compiler of the same era.
memcmp is pretty expensive for 16 byte (ipv6 prefixes) compares especially when
you only care about equal or not equal. Code's usually smaller too. Nothing faster than xor exists.
The text was updated successfully, but these errors were encountered: