Interesting -  there seems to be a very slight performance advantage to 
your version on my machine (consistently about 25% faster for if-nots in a 
tight loop).

I think the problem is actually with "not" - which isn't getting inlined 
currently. If I patch not so that it is inlined, the difference disappears.

Worth a quick patch maybe?

On Thursday, 22 January 2015 03:51:37 UTC+8, Leon Grapenthin wrote:
>
> I am surprised to find the two branch implementation of if-not as follows:
>
>
> ([test then else]
>    `(if (not ~test) ~then ~else))
>
>
> What I expected was:
>
>
> ([test then else]
>    `(if ~test ~else ~then))
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to