On Sep 8, 2012, at 7:38 PM, Andy Fingerhut wrote:

> Rich:
> 
> I'm not sure what you mean by the not-fastest-path possible that exists in 
> today's Clojure code, so if you get a chance, see if the below is what you 
> mean.
> 
> As far as I can tell (i.e. putting debug println's in the Java code of 
> RT.map), when someone enters a map literal in, say, a function definition, 
> and all keys *and* values are compile time constants, it calls RT.map() while 
> the function is being compiled, but never again when the function is called.
> 
> If I make a similar function with run-time variable keys or values, RT.map() 
> is called every time the function is invoked.  Each of these calls repeats 
> the check that the keys are unique.
> 
> Do you mean that you want a new code path where if the keys are compile time 
> constants, but the values are variables at compile-time, then at run time 
> this map should be created with a method that avoids the unnecessary check 
> for unique keys?
> 

Exactly.

> And by the word "restore" do you mean to imply that it was this way at one 
> time before?
> 

Nope. It was that fast, but did no compile-time checks.

Thanks

Rich

> 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to