Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cista #2

Open
cflaviu opened this issue May 21, 2022 · 1 comment
Open

Cista #2

cflaviu opened this issue May 21, 2022 · 1 comment

Comments

@cflaviu
Copy link

cflaviu commented May 21, 2022

Hi, I just come across to this repo and it seems to me the library's goal was also achieved by Cista.

@Tradias
Copy link
Owner

Tradias commented May 21, 2022

Heya, I believe the design goals of the two libraries are a bit different, but I guess cista can be used to achieve a similar memory layout compared to this library.

I believe a closer comparison to contiguous would be https://github.com/brenoguim/flexclass.

Not sure whether I have used cista correctly and it certainly would be more cumbersome to append new elements to the contiguous vector e.g., but the numbers look good for it: (you can see the code here)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                                                                                           Time             CPU   Iterations UserCounters...
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/100000/20             4043563 ns      4102654 ns          179 elements=100k fixed size=20 
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/250000/20            10042039 ns     10009766 ns           64 elements=250k fixed size=20
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/500000/20            20119853 ns     20220588 ns           34 elements=500k fixed size=20
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/100000/25             4734265 ns      4741379 ns          145 elements=100k fixed size=25
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/250000/25            11900089 ns     11718750 ns           56 elements=250k fixed size=25
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/500000/25            23706597 ns     23958333 ns           30 elements=500k fixed size=25
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/100000/30             5853298 ns      5781250 ns          100 elements=100k fixed size=30
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/250000/30            14500646 ns     14375000 ns           50 elements=250k fixed size=30
full iteration2: std::vector<struct(std::array<float, 15>,float,std::array<float, 15>)>/500000/30            29272883 ns     29296875 ns           24 elements=500k fixed size=30
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/100000/70            14489447 ns     14583333 ns           45 elements=100k fixed size=70
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/250000/70            35898300 ns     36184211 ns           19 elements=250k fixed size=70
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/500000/70            72147009 ns     72443182 ns           11 elements=500k fixed size=70
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/100000/80            16365915 ns     16387195 ns           41 elements=100k fixed size=80
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/250000/80            40892224 ns     41360294 ns           17 elements=250k fixed size=80
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/500000/80            81779633 ns     83333333 ns            9 elements=500k fixed size=80
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/100000/90            17962002 ns     17911585 ns           41 elements=100k fixed size=90
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/250000/90            45269956 ns     44921875 ns           16 elements=250k fixed size=90
full iteration2: std::vector<struct(std::array<float, 45>,float,std::array<float, 45>)>/500000/90            89805657 ns     91517857 ns            7 elements=500k fixed size=90
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/100000/20    4514140 ns      4565747 ns          154 elements=100k fixed size=20
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/250000/20   11647330 ns     11997768 ns           56 elements=250k fixed size=20
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/500000/20   23483929 ns     23437500 ns           28 elements=500k fixed size=20
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/100000/25    5750364 ns      5937500 ns          100 elements=100k fixed size=25
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/250000/25   14647529 ns     14930556 ns           45 elements=250k fixed size=25
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/500000/25   29431104 ns     29296875 ns           24 elements=500k fixed size=25
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/100000/30    7054572 ns      7118056 ns           90 elements=100k fixed size=30
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/250000/30   17630992 ns     17736486 ns           37 elements=250k fixed size=30
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/500000/30   35708120 ns     35156250 ns           20 elements=500k fixed size=30
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/100000/70   16463644 ns     16319444 ns           45 elements=100k fixed size=70
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/250000/70   41278612 ns     40441176 ns           17 elements=250k fixed size=70
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/500000/70   84280943 ns     82589286 ns            7 elements=500k fixed size=70
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/100000/80   18429430 ns     18158784 ns           37 elements=100k fixed size=80
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/250000/80   45938653 ns     45833333 ns           15 elements=250k fixed size=80
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/500000/80   93143200 ns     93750000 ns            7 elements=500k fixed size=80
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/100000/90   20294981 ns     20507812 ns           32 elements=100k fixed size=90
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/250000/90   50698064 ns     49715909 ns           11 elements=250k fixed size=90
full iteration2: std::pmr::vector<struct(std::pmr::vector<float>,float,std::pmr::vector<float>)>/500000/90  102770871 ns    102678571 ns            7 elements=500k fixed size=90
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/100000/20                          3897145 ns      3843583 ns          187 elements=100k fixed size=20
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/250000/20                          9705204 ns      9791667 ns           75 elements=250k fixed size=20
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/500000/20                         19418229 ns     18841912 ns           34 elements=500k fixed size=20
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/100000/25                          4613989 ns      4614094 ns          149 elements=100k fixed size=25
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/250000/25                         11524177 ns     11718750 ns           56 elements=250k fixed size=25
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/500000/25                         22978040 ns     22916667 ns           30 elements=500k fixed size=25
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/100000/30                          5725234 ns      5729167 ns           90 elements=100k fixed size=30
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/250000/30                         14193988 ns     14375000 ns           50 elements=250k fixed size=30
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/500000/30                         28528954 ns     28645833 ns           24 elements=500k fixed size=30
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/100000/70                         14182152 ns     14375000 ns           50 elements=100k fixed size=70
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/250000/70                         35238532 ns     35361842 ns           19 elements=250k fixed size=70
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/500000/70                         71068878 ns     69444444 ns            9 elements=500k fixed size=70
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/100000/80                         15877822 ns     15625000 ns           41 elements=100k fixed size=80
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/250000/80                         40246544 ns     40798611 ns           18 elements=250k fixed size=80
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/500000/80                         79917389 ns     79861111 ns            9 elements=500k fixed size=80
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/100000/90                         17705778 ns     17708333 ns           45 elements=100k fixed size=90
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/250000/90                         44050287 ns     43945312 ns           16 elements=250k fixed size=90
full iteration2: ContiguousVector<FixedSize<float>,float,FixedSize<float>>/500000/90                         89298733 ns     88541667 ns            6 elements=500k fixed size=90
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/100000/20                      4001017 ns      4015363 ns          179 elements=100k fixed size=20
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/250000/20                     10028148 ns      9791667 ns           75 elements=250k fixed size=20
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/500000/20                     20028826 ns     20220588 ns           34 elements=500k fixed size=20
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/100000/25                      4833679 ns      4743304 ns          112 elements=100k fixed size=25
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/250000/25                     12075343 ns     12276786 ns           56 elements=250k fixed size=25
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/500000/25                     24168282 ns     24553571 ns           28 elements=500k fixed size=25
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/100000/30                      5685143 ns      5719866 ns          112 elements=100k fixed size=30
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/250000/30                     14212054 ns     14375000 ns           50 elements=250k fixed size=30
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/500000/30                     28427392 ns     28125000 ns           25 elements=500k fixed size=30
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/100000/70                     13714945 ns     13392857 ns           56 elements=100k fixed size=70
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/250000/70                     34245965 ns     34375000 ns           20 elements=250k fixed size=70
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/500000/70                     69239344 ns     69444444 ns            9 elements=500k fixed size=70
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/100000/80                     15485056 ns     15625000 ns           45 elements=100k fixed size=80
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/250000/80                     38699458 ns     38651316 ns           19 elements=250k fixed size=80
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/500000/80                     77435878 ns     78125000 ns            9 elements=500k fixed size=80
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/100000/90                     17106456 ns     16768293 ns           41 elements=100k fixed size=90
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/250000/90                     43222719 ns     42968750 ns           16 elements=250k fixed size=90
full iteration2: ContiguousVector<VaryingSize<float>,float,VaryingSize<float>>/500000/90                     86814300 ns     89285714 ns            7 elements=500k fixed size=90
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/100000/20                           3738141 ns      3766026 ns          195 elements=100k fixed size=20
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/250000/20                           9372799 ns      9375000 ns           75 elements=250k fixed size=20
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/500000/20                          18827884 ns     19003378 ns           37 elements=500k fixed size=20
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/100000/25                           4618216 ns      4565747 ns          154 elements=100k fixed size=25
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/250000/25                          11570379 ns     11718750 ns           56 elements=250k fixed size=25
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/500000/25                          22931250 ns     22321429 ns           28 elements=500k fixed size=25
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/100000/30                           5496141 ns      5468750 ns          100 elements=100k fixed size=30
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/250000/30                          13717192 ns     13437500 ns           50 elements=250k fixed size=30
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/500000/30                          27582273 ns     27644231 ns           26 elements=500k fixed size=30
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/100000/70                          13803322 ns     13750000 ns           50 elements=100k fixed size=70
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/250000/70                          34397550 ns     34375000 ns           20 elements=250k fixed size=70
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/500000/70                          68417327 ns     69602273 ns           11 elements=500k fixed size=70
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/100000/80                          15376369 ns     15277778 ns           45 elements=100k fixed size=80
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/250000/80                          38601918 ns     38602941 ns           17 elements=250k fixed size=80
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/500000/80                          77114267 ns     76388889 ns            9 elements=500k fixed size=80
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/100000/90                          17171996 ns     17013889 ns           45 elements=100k fixed size=90
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/250000/90                          43252994 ns     42968750 ns           16 elements=250k fixed size=90
full iteration2: Cista<offset::vector<float>,float,offset::vector<float>>/500000/90                          86437856 ns     86805556 ns            9 elements=500k fixed size=90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants