Clojure

Protocol call sites emit many unused fields and bytecodes

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

Three unused instance member fields are emitted by emitProto() in the compiler - seems that at some point it was for inline caching of protocol implementations, but it looks like that's all handled by MethodImplCache now.

This patch eliminates it, and brings down protocol heavy classes like the new ManyToManyChannel in core.async from 120+ fields down to 23 fields, mostly Var caches.

There should be a lot less bytecode in such classes now, and less memory overhead.

Activity

Hide
Ghadi Shayban added a comment -

Needs work

Show
Ghadi Shayban added a comment - Needs work

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: