zigself icon indicating copy to clipboard operation
zigself copied to clipboard

runtime: Add a basic monomorphic cache implementation

Open sin-ack opened this issue 2 years ago • 0 comments

Tasks:

  • [x] Allocate an inline cache inside ExecutableMap
  • [x] Put receiver map-method object pairs inside the inline cache
  • [ ] Query the inline cache during method lookup and use it first
  • [ ] Invalidate the inline cache when the dependent method changes
  • [ ] Make the inline cache weak, so that references can be dropped when they are no longer referenced by anything else

Optional tasks:

  • [ ] Implement quickening (https://bernsteinbear.com/blog/inline-caching-quickening/)

Questions to answer:

  • [ ] Who owns the inline cache?
  • [ ] Should the inline cache be an ArrayObject or should it be given its own dedicated object type?
  • [ ] Should global objects' inline caches be affected by actor-owned methods?
  • [ ] Should actors' inline caches be affected by actor-owned methods?
  • [ ] Implications of inline caching from a concurrency standpoint

sin-ack avatar Jun 04 '23 16:06 sin-ack