Added a "uuid-string" getter function to obtain a string representation of a
UUID-instance, which makes for easier interop with apps that require such a
uuid-string, like web-app, json, databases (i.e. legacy apps that have not been
made EDN-aware yet ;-) )
(thanks to Robert Stuttaford for the
I've wrapped my random uuid generator up in a little library at:
https://github.com/franks42/cljs-uuid-utils
---
cljs-uuid-utils
ClojureScript micro-library with an implementation of a type 4, random UUID
generator compatible with RFC-4122 and cljs.core/UUID (make-random-uuid), a
uuid-string c
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.
O
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 w
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 ge
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
Cloju