ClojureScript

using keywords as fns is slow

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Modifying native prototypes is useful but very slow in v8 & jsc. For common patterns like keywords as fns - this is a big performance hit. The compiler should perhaps emit a shared keyword wrapper which implements IFn.

Activity

Hide
David Nolen added a comment -

Rich gave me a good suggestion - optimize at the call site - fast path is property lookup.

Show
David Nolen added a comment - Rich gave me a good suggestion - optimize at the call site - fast path is property lookup.
Hide
David Nolen added a comment - - edited

fixed, http://github.com/clojure/clojurescript/commit/17ed473db0bc1759965667f975d89d9c01dda34b

Doesn't handle the higher order case, but we can make a separate ticket for that.

Show
David Nolen added a comment - - edited fixed, http://github.com/clojure/clojurescript/commit/17ed473db0bc1759965667f975d89d9c01dda34b Doesn't handle the higher order case, but we can make a separate ticket for that.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: