On Monday, 3 June 2019 01:50:26 PDT Giuseppe D'Angelo via Development wrote: > At some QtCS Thiago was talking about 23-24 QChars, i.e. 48 bytes, plus > a couple of pointers or so, to bring it to 64 bytes (~ a cacheline).
The minimum size for a QString is 3 pointers, which would be 12 bytes on 32- bit. Given we need at least one byte to indicate that it's SSO o not, that would leave an SSO QString limited to 5 chars, which is not very useful. On 64-bit, it would increase to 11 characters. That is better, but given previous histograms of the size of strings in a real-world application (QtCreator), it's leaving a lot on the table. I think the numbers showed that the most common size was 16, but I don't remember if that was bytes or characters. Either way, the drop to the right of the peak wasn't very sharp. The sweet spot is likely to be between 32 and 48 bytes (15 to 23 characters). -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel System Software Products _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development