two new UDS structures
Summary:
The two new UDS structures are similar to Frank's, but instead of using two vectors, use only one, with the index next to the data. The first structure uses linear access and in the autotests is the fastest.
The second structure uses binary access and scales better in the number of fields.
I've added to the last 3 test a new one to measure read time as used in KFileItemPrivate::cmp.
If you like one of the new structures, it can replace the one currently used in KIO::UDSEntryPrivate.
Test Plan:
run the test several times
The interesing results in my pc: (using parameter -vb)
0.00056 msecs per iteration (total: 74, iterations: 131072) 0.00032 msecs per iteration (total: 86, iterations: 262144) 0.00053 msecs per iteration (total: 70, iterations: 131072) 0.00036 msecs per iteration (total: 95, iterations: 262144) 0.00014 msecs per iteration (total: 77, iterations: 524288) 0.00048 msecs per iteration (total: 64, iterations: 131072) 0.00041 msecs per iteration (total: 54, iterations: 131072) 0.00021 msecs per iteration (total: 57, iterations: 262144) 0.00048 msecs per iteration (total: 64, iterations: 131072)
Reviewers: dfaure, Frameworks
Reviewed By: dfaure
Subscribers: bruns
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D12659