closures inside the body of a function are not free in JS. I would lift those helpers out. In general I see no benefit to writing your "fast" code in JS - all the facilities for writing efficient code are available in ClojureScript itself. I agree that it's not completely clear what subset of ClojureScript is guaranteed to be efficient - hopefully somebody will take the time to try some experiments and document them, I'm more than willing to help anyone that attempts to do so.
David On Thu, Nov 29, 2012 at 1:25 AM, Frank Siebenlist < frank.siebenl...@gmail.com> wrote: > I need UUIDs in my CLJS code… > > cljs.core does include a UUID type, but no generator. > > I found a couple of efforts and example code at > https://github.com/davesann/cljs-uuid and > http://catamorphic.wordpress.com/2012/03/02/generating-a-random-uuid-in-clojurescript > , > but they didn't work with cljs.core/UUID or were too slow. > > There are many javascript versions out there, but that would require > another external js-lib. > (really surpising that I couldn't find a UUID generator in closure-lib…) > > Please take a look at my UUID-playground at " > https://gist.github.com/4159427", > which includes a few implementations with some rudimentary timing results. > > Appreciate any comments or suggestions, or maybe a pointer to a faster, > cleaner implementation... > > Thanks, FrankS. > > PS. I would think that the cljs-community would love to have a UUIDv4 > generator as part of the clojurescript distro... > > > -- > 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 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