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

Optimize lists #114

Open
KCreate opened this issue Aug 31, 2022 · 0 comments
Open

Optimize lists #114

KCreate opened this issue Aug 31, 2022 · 0 comments

Comments

@KCreate
Copy link
Owner

KCreate commented Aug 31, 2022

  • Currently each list read / write access has to be synchronized via a lock, as multiple fibers could access it at the same time.
  • In a simple stress test (accessing the same offset in an infinite loop), lock and unlock of the objects TinyLock take up ~20% of the entire execution time
  • Maybe there is some fancy lock-free data-structure that implements dynamic vectors.
  • Creating lists via List.create will initialize fields to null. Allocation of backing memory can be deferred until a write access to that index happens. Read access to uninitialized list indices can just statically return null. Requires some profiling and a benchmark to see if this makes sense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant