
2015-05-07 18:28 GMT+08:00 Joaquin M Lopez Munoz
TONGARI J
writes: FWIW, I made a simple proof-of-concept, it's basically a het_collection with ordering.
https://gist.github.com/jamboree/5a5797e8869168cc64d9
Maybe someone would give it a performance test.
Can't you maybe adapt the testing framework at
https://www.dropbox.com/s/qy9qbf0eyf1itsy/het_collection.cpp?dl=0
and run that locally?
https://gist.github.com/jamboree/7fca5045a1bcd880ba4b [MSVC14 RC] variant_sequence(no-order);variant_sequence;variant_sequence(sorted);vector_variant; for_each: 1000;0.00741892;0.033256;0.0234027;0.045456; 10000;0.0073138;0.0325596;0.0230426;0.0449622; 100000;0.00748698;0.0391825;0.0230043;0.045153; 10000000;0.0128108;0.0405801;0.0248128;0.0497122; [g++ 4.9.2/MinGW64] variant_sequence(no-order);variant_sequence;variant_sequence(sorted);vector_variant; for_each: 1000;0.0034023;0.0368542;0.00955831;0.0217586; 10000;0.003645;0.0363854;0.0095947;0.0210316; 100000;0.00367347;0.0425784;0.00957825;0.0213344; 10000000;0.00921831;0.0457604;0.0129568;0.0289718; As expected, variant_sequence performs better than vector_variant when the data is grouped, while it performs worse than vector_variant when the data is dispersed.