Über Open CoDE Software Wiki Diskussionen GitLab

Skip to content

Adjust optimized field lengths for persons and organisations

Adam Reichold requested to merge persons-pessimization into main

The cumulative histogram for the persons field starts with

0: 93.6 %
2: 96.8 %
1: 99.8 %
3: 99.8 %
4: 99.9 %

i.e. optmized for 1 persons is not that useful and we optimize for zero instead which means we can use a normal Vec instead of a SmallVec.

The cumulative histogram for the orginasations field starts with

0: 70.3 %
2: 85.2 %
1: 98.7 %
3: 99.1 %
4: 99.3 %

which suggests to optimize for <= 2 items instead of <= 1.

Note that these are not schema changes because Vec<T> and SmallVec<[T; N]> are both just sequences in the persistent data model.

Merge request reports

Loading