Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Performance comparison between lseqarray and lseqtree #7

Open
Chat-Wane opened this issue Oct 14, 2014 · 0 comments
Open

Performance comparison between lseqarray and lseqtree #7

Chat-Wane opened this issue Oct 14, 2014 · 0 comments

Comments

@Chat-Wane
Copy link
Owner

Comparing perf between lseqarray and lseqtree raised this issue: lseqarray is far better on insertions at the end of the sequence. Obviously, lseqarray is very efficient in this case because it does not require any shifting in the underlying array (and very inefficient in the antagonist inserting behaviour: requires N shiftings). On the other side, lseqtree uses a tree as underlying model. Thus, each object in the first array have sub-arrays etc... Therefore, the shiftings are bounded by the sub-array length. It implies better perf on insertion at the beginning and at random position (making lseqtree safer to use). However, inserting at the end is less efficient.... Problem is: from an algorithmic point of view, they should be even. As consequence, it is possible to improve a lot the efficiency of the code.

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

No branches or pull requests

1 participant