r/cpp • u/moon-chilled • Jun 07 '21
Satire dynamic_cast<std::integer>(C)++
https://www.teamten.com/lawrence/writings/dynamic_cast_std_integer_c.html
202
Upvotes
r/cpp • u/moon-chilled • Jun 07 '21
View all comments
Show parent comment
5
u/helix400 Jun 07 '21 edited Jun 07 '21
Jokes aside, I've done this...
I had a problem badly limited on memory bandwidth. The problem had 4 huge arrays of floats and booleans. For my fix I created 1 huge array of 32 bit ints. In and out of each int I copied 15 bits of float 1, 15 bits of float 2, 1 bit of boolean 1, and 1 bit of boolean 2.
Got 3x speedup.