Hi,
afaik the Clojure compiler will compile such calls to a direct field
access, i.e. the fastest possible.
This will happen whenever the compiler can infer the type information.
You can facilitate this by using type hints if necessary.
Regards,
Las
2014-05-16 15:44 GMT+01:00 Dave Tenny :
> (d
(defrecord Foo [bar])
(:bar (Foo. 1))
Is clojure smart enough to make the :bar lookup O(1) as a known field of
Foo? Or is it still a map-like O(logN) lookup?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo