|
|
|
|
|
by Veedrac
3274 days ago
|
|
> Then, a bit later, we need to very quickly finish populating the structs. I am finding it extremely hard to envision a circumstance where this is a bottleneck for anything. Care to clarify the context? I also find the struct layout really odd; why not just move c? Your benchmarks are also probably broken; branch predictors use global state so will almost certainly predict fine the way you've used things. You need to repopulate a significantly-sized array each time with randomly chosen values. You can't use the same array because it'll be learnt, and you can't use a short array because it'll be predicted globally. |
|
For some additional context, these structs are packed wire-line protocol structs. In reality the padding bytes are full of other fun details.