This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-15
Channels
- # announcements (1)
- # beginners (101)
- # boot (13)
- # cider (38)
- # cljdoc (10)
- # cljs-dev (37)
- # cljsrn (6)
- # clojure (74)
- # clojure-dev (8)
- # clojure-europe (3)
- # clojure-italy (36)
- # clojure-losangeles (2)
- # clojure-nl (5)
- # clojure-spec (15)
- # clojure-uk (49)
- # clojuredesign-podcast (2)
- # clojurescript (52)
- # cursive (6)
- # datomic (19)
- # fulcro (35)
- # graalvm (16)
- # graphql (4)
- # kaocha (1)
- # leiningen (26)
- # luminus (3)
- # re-frame (10)
- # reagent (14)
- # ring-swagger (37)
- # rum (2)
- # schema (4)
- # shadow-cljs (148)
- # spacemacs (13)
- # specter (1)
- # sql (46)
- # tools-deps (3)
- # vim (4)
I know a fair amount about perf testing on Clojure on Java, but not so much about what good recommendations might be for ClojureScript. Are there 1 to maybe up to 3 JS runtimes that are most important for perf testing? Anything like JVM JIT warm-up time to be concerned about, and if so, any recommended libraries to help do that for you?
I'm asking because of the core.rrb-vector library, which is focused on in-memory vector data structures only, so things like DOM access or GUI interactions should be a non-issue.
hi @andy.fingerhut, I expect you know about simple-benchmark, but just in case, here’s an mfikes blog article on it: https://blog.fikesfarm.com/posts/2017-11-18-clojurescript-performance-measurement.html
Nope, that is new to me -- I have successfully avoided JavaScript and mostly avoided ClojureScript for a long time now. thx for the pointer
V8, JavaScriptCore and SpiderMonkey are the most important ones - there is some warmup time but not as slow as JVM in my experience
I don't use anything except for simple timing + many iterations and the Chrome profiler
I think I’ve tracked this answer down before, but now can’t figure it out 100% again.
What is about JS strings that makes it safe to do keyword-identical?
& symbol-identical?
be done on the underlying string?
Does JS even have a standard operation that determines if two strings (or arbitrary objects) are the same object in memory?
Maybe answering my own question, but looks like ===
is "same object" with perhaps the only exception being for strings: https://stackoverflow.com/questions/13685079/how-to-check-if-two-vars-have-the-same-reference
@andy.fingerhut not true
Since this discussion reminded me of it, does JS have things like Java's IdentityHashMap, i.e. a hash keyed by object identity rather than some other notion of equality?
but it seems to work out for the cases I’ve tried - but then again, it’ll possibly vary from runtime to runtime - so was wondering if it was a spec thing
but was trying to find times when it doesn’t work, but if the identical?
of cljs is ===
and that isn’t object-identity then perhaps that’s the answer
@mikerod if you're looking for evidence you can read the JS language specification which covers this
definitely recommend checking this if you want to know what the VM implementers are guaranteeing