ClojureScript

protocol dispatch performance enhancement & extend-type to nil

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

Description

Currently we extend to nil to a bunch of protocols, while this was convenient for the initial implementation this has many unfortunate performance consequences. We should probably not extend nil to anything and deal with the nil value directly as is done in Clojure on the JVM. In addition we can add a special ^not-native type-hint. In critical paths this would allow us to inline calls directly to protocol implementations.

Perhaps this could also allow us to hint with ^native to inline calls to the native tables.

Activity

David Nolen made changes -
Field Original Value New Value
Priority Major [ 3 ] Minor [ 4 ]
David Nolen made changes -
Summary protocol dispatch performance enhancement protocol dispatch performance enhancement & extend-type to nil
David Nolen made changes -
Resolution Declined [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: