Skip to content

Optimize lists #114

Open
Open
@KCreate

Description

@KCreate
  • 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions