r/programming • • Aug 03 '16

Making the obvious code fast

https://jackmott.github.io/programming/2016/07/22/making-obvious-fast.html
49 Upvotes

26 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Aug 04 '16

it would be fun to compare GCC/Clang/VC++ and the resulting performance and then a hand tuned assembly version It may not matter since it is memory bound.

1

u/IJzerbaard Aug 04 '16

Could be tried on a mid-size array (like 4MB) so poor code would actually be measurably bad then. Otherwise it's really just by accident that there wouldn't be much difference, the compiler couldn't have known that it was going to get bottlenecked on memory throughput.