CppTrader icon indicating copy to clipboard operation
CppTrader copied to clipboard

Implication of increasing Symbol name size to 16 bytes

Open ang-st opened this issue 3 years ago • 1 comments

Hi @chronoxor,

While we wanted to add a market pair with 10 letters, we recently noticed that Symbol name is defined as 8 bytes. https://github.com/chronoxor/CppTrader/blob/5126be48be9939a8eeb5db3254b052c12c2324d1/include/trader/matching/symbol.h#L26

What we thought could be an easy fix (just make char Name[16]) seems to have implication as there are some places where code is optimized with unrolling and bit manipulations.

Before we patch it (and eventually propose it upstream) we wanted to clarify if that kind of change could impact code mechanical sympathy and as we are not high performance cpp expert by any means, wanted you opinion on the matters

Regards

ang-st avatar Dec 13 '21 13:12 ang-st

I see no problem with it. You'll see no difference until you measure nanoseconds :)

chronoxor avatar Dec 13 '21 14:12 chronoxor