by frankmcsherry · 11y ago · 0 comments
The reason the new numbers look better for Option with the Copy implementation is that you are now writing 16 bytes for each Option. They are a 50-50 mix of Some(0u) and None, which I wrote out in 5 bytes on average (always a 1 byte "present/not", and then 4 bytes of data on average). The Copy implementation is just writing 3x as much data and padding the throughput numbers, rather than reporting something more like goodput.
I sense that this isn't the right place to shake this out, so I'll stop posting. If there is a better way to follow up, let me know.
[edit: I've got you through github, thanks! I'll buy beers when I swing by TU next]
Using your original benchmark I than show that the row layout brings a large performance win in the benchmark. My numbers show this performance win not just in throughput (bytes per sec.) but als in "goodput" (values per sec.). Check my previous comment. I just noticed though that I sometimes forgot the k in the reported numbers, where it is missing you have ti multiply the number times 1000, I can't edit it anymore.
I guess we can agree to disagree and should continue the discussion in another form ;)
PS: I just updated my github information, I am now at the TU Munich