News for hackers. Stuff that matters.
Re:Asmttpd – Web server for Linux written in amd64 assembly by nostrademons on Tuesday May 19, 2015 @10:41PM (#9574380)
You mean vectorizing memcmp/memcpy to work word-at-a-time instead of byte-at-a-time? Google does this when compiling their binaries, and I think Facebook does too. I thought the latter had open-sourced it with Folly but couldn't find a code pointer. I've heard rumors that LLVM can sometimes vectorize them to use SIMD instructions when available, too.

It's hard to do this safely for strcpy/strcmp because you might read past the end of the buffer when trying to test against a null terminator. memcmp/memcpy and length-prefixed blocks let you use a Duff's-Device-like construct to test only the last word byte-by-byte.

Re:Asmttpd – Web server for Linux written in amd64 assembly by JoeAltmaier on Wednesday May 20, 2015 @12:53AM (#9574739)
In a paged system, reading past the end of the string, but no further than the last whole aligned word containing the null terminator, will never page fault. So that can still work.