It has been a great learning experience on both Clojure internals and the
Clojurescript side.
One thing to note, that the handwritten JS (which also a straight port of
the java version and not optimized by the closure compiler) still
outperforms the Clojurescript version consistently by at least a factor of
3-3.5x on V8 and slightly on other engines.

It would be interesting to see why. I suspect that the code generated by
cljsc can be improved a lot and currently it does not always lend itself to
agressive inlining. (pure speculation, yet to be confirmed)
On the other hand, I understand that there are certain conventions that
have to be observed for CLJS abstractions like protocols etc. to work.

I'm interested to hear opinions and directions on where to go from hear:
chunked sequences and transient will certainly deliver a performance boost.
How about pods? Is there a design written up out there?

Is there a clojure experimental implementation on separate branch?

Las

2012/3/29 Evan Mezeske <emeze...@gmail.com>

> This is excellent.  Big thanks to Laszlo!  I've been working on
> a Raphaël-based interactive GUI app in ClojureScript that maintains a big
> vector of elements, and had just recently started to run into what seemed
> to be the performance limits of the copy-on-write approach.  I'm very
> optimistic that this feature will allow me to keep using vectors instead of
> dropping down to mutable host arrays, which is a big win.  I can't wait to
> try this.
>
> -Evan
>
>
> On Thursday, March 29, 2012 2:31:10 PM UTC-7, David Nolen wrote:
>>
>> Thanks to Laszlo Török, ClojureScript now has PersistentVectors,
>> https://github.com/clojure/**clojurescript/commit/**
>> e615f4cd326e7c608050272c64c4df**aff9a34689<https://github.com/clojure/clojurescript/commit/e615f4cd326e7c608050272c64c4dfaff9a34689>
>> .
>>
>> They are based on the Java implementations found in Clojure. I'm happy to
>> say they thoroughly trounce the old copy-on-write Vectors:
>>
>> http://jsperf.com/**persistentvector-norecur-js/11<http://jsperf.com/persistentvector-norecur-js/11>
>>
>> Note how much room for improvement we have on JS engines like V8 :)
>>
>> David
>>
>  --
> 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




-- 
László Török

-- 
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