Stream: wg-secure-code

Topic: Safe code faster than unsafe?!


Shnatsel (Jun 24 2019 at 21:53, on Zulip):

I've added zero-initialization to growing a Vec and that made the entire decoding process 5% faster! I know vec![len; 0]; actually requests zeroed memory from the OS, but in here extending the vector with zeroes is supposed to be strictly slower than simply writing to a slice of uninitialized memory! What kind of sorcery is this?! https://github.com/sile/libflate/pull/34/files

Shnatsel (Jun 24 2019 at 21:54, on Zulip):

Tests still pass, I've checked

Tony Arcieri (Jul 01 2019 at 16:51, on Zulip):

hahaha, nice

Last update: Nov 11 2019 at 22:35UTC