Also note that testing with the Rhino REPL is not informative about
performance in anyway - you absolutely need to test your code against the
modern JS engines - V8, JavaScriptCore, or SpiderMonkey (with JIT turned
on). For code like this they are often 100X faster if not far greater than
that.


On Thu, Nov 29, 2012 at 1:07 PM, Frank Siebenlist <
frank.siebenl...@gmail.com> wrote:

> Thanks for the feedback!
>
> Defining the two helper functions outside of the function-scope doesn't
> seem to have any effect on the performance numbers.
>
> …but I have to confess that all testing was done at the repl without any
> optimization so far…
>
> -FS.
>
>
>
> On Nov 29, 2012, at 8:36 AM, David Nolen <dnolen.li...@gmail.com> wrote:
>
> > Oh though before you lift them out by hand - I would double check that
> :simple optimizations doesn't already do this for you :)
> >
> >
> > 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
>
> --
> 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

Reply via email to