The JVM is concurrent whereas Javascript VMs are singled-threaded. Var
initialisation in Clojure uses concurrency primitives to ensure that
namespaces are always consistent for all threads, whereas Clojurescript
simply assigns to variables. Our profiling of Clojure on the JVM indicates
that a lot of the time spent in namespace initialisation is spent in
concurrency structures, and this seems much more significant for
non-clojure-core namespaces.

On Fri, Jan 26, 2018 at 7:22 AM Mikhail Gusarov <[email protected]>
wrote:

> cljs vars are not reified.
>
> On Thu, 25 Jan 2018, at 18:24, Didier wrote:
> > Based on the profiling performed here
> > http://clojure-goes-fast.com/blog/clojures-slow-start/ on 1.9,
> >
> > It looks like clojure/core__init.load is the slowest bit with load and
> > requiring spending the most time on, as well as loadClass, followed by
> > clojure/lang/Var.invoke.
> >
> > Wouldn't ClojureScript also need to initialize all Vars and execute top
> > level forms? You'd think that part would be slower in JavaScript no?
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to [email protected]
> > Note that posts from new members are moderated - please be patient with
> > your first post.
> > To unsubscribe from this group, send email to
> > [email protected]
> > 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 [email protected].
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Stephen Nelson | Platform Lead Developer | Montoux
e.      [email protected] <[email protected]>
t.      @montoux
w.      montoux.com

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to