Commit Graph

14 Commits

Author SHA1 Message Date
Marcel Märtens
7039d5a29c move away from the system that a layer stores it's parent index, but let a layer store their index used to access the child data. which makes everything much clearer and nicer to read and easier to develop on
Redone the whole implementation again on this and now use a trait for HashResult and VecResult which solves the .get() problem and .mat() problem
added benchmarks and (with repeated tests) we gain 14ns for 1 hash lookup and 2 veclookups and the result vec lookup
2021-08-13 10:47:46 +02:00
Marcel Märtens
1605fe202e experiment with simplified version to fix the get problem 2021-08-13 10:47:17 +02:00
Marcel Märtens
40a20001d8 use associated_type_bounds to implement the Traversable, but it only works for once limitation at once because of a limitation in the rust compiler, which thinks there is a ambiguity (KEY=u16, KEY=32) which is not possible 2021-08-13 10:45:39 +02:00
Marcel Märtens
9f69dbb4ca experiment with KeyConvertable which has compress undcompress function
set a tem OWN_PER_PARENT const because i couldn't figure out childs correctly
experiment with a first get implementation, and choose to make trav return a ResultLayer on current layer not one below
2021-08-13 10:35:40 +02:00
Marcel Märtens
4847229457 cleanup and renaming LodIndex to LodPos in new data implementation 2021-08-13 10:35:11 +02:00
Marcel Märtens
70831aea62 move to associated types in most traits to clean up mess
implement a api to travers to the Detail already
create a DetailStore for actual work on the Detail
create Nestable for child layer trait
update description
2021-08-13 10:34:43 +02:00
Marcel Märtens
85ca33024c added an experimental new data model which is based on more traits and structs 2021-08-13 10:34:13 +02:00
Marcel Märtens
5617efff48 implement LodDelta to catch changes in LodData
test caching of LodData access
2021-08-13 10:22:42 +02:00
Marcel Märtens
d5dca4f6e8 work on a deltas, to store the diff while working on data.
this state does not work, because i tried to iplement delta in a trait type. however this is not necessary, i will revert this.
Just keep this commit for historical reasons - it wont build.
2021-08-13 10:22:11 +02:00
Marcel Märtens
536ef3d6ff increasing performance by another 10-20% on read as well as on write
Option<usize> takes 16 bytes which we cannot allow,
so we use a u32 to store the same information, we use std::u32::MAX to mark that a LOD has no children
we have no checks for that limit, so we hope it never gets that high... dear god...
the intel laptop statistics now seem to be alot more stable and even top the ryzen desktop statistics, we get faster in every bench
2021-08-13 10:21:41 +02:00
Marcel Märtens
caa7150556 fix all tests, now the new ECS access should work fine.
this implementations reaches about 3000 ns per access, need to improve further
2021-08-13 10:21:13 +02:00
Marcel Märtens
3c92e831e7 bring basic new featureset to work with make_at_least, still needs to fix some bugs 2021-08-13 10:20:32 +02:00
Marcel Märtens
a3c36f135a implement a new version, that uses a more ecs approach of LOD.
the old implementation needed a Vec per Element, which itself needs 24 bytes, which is a huge overhead for a single byte element.
the new implementation has global Vec per region and only needs a index for the first element, which might be 8 bytes (implementation 4 bytes because of some assumptions) or none at all.
It's still not ideal, because it will requiere alot of duplicate coding.

Former-commit-id: 7172829c18ceabe67689487ffd269ebe62d1647b
2021-08-13 10:11:50 +02:00
Marcel Märtens
1456497bd0 start working on RFC#11,
implement a regionmanager and basic region component as well as tests for those
this is a fist implementation and likly to change

Former-commit-id: fdb7097dc30ab1642d25a02532458bcc2811ab61
2021-08-13 10:08:21 +02:00