Fork me on GitHub
#cljs-dev
<
2017-06-02
>
rauh16:06:50

Should there be an ns macro defined in core, for the sole purpose of providing a doc string?

dnolen17:06:43

@rauh I don’t follow - oh …

dnolen17:06:26

or it could just be a REPL thing

mfikes17:06:13

ns being a special form has its docstring in cljs.repl/special-doc-map

rauh17:06:58

Oh I see, so it's working in other editors and in the REPL (Which I never use directly by hand). Cursive doing static analysis isn't able to pick it up.

mfikes17:06:46

Ahh, right. Probably something Colin can special-case in the ClojureScript REPL support.

rauh17:06:19

I guess it's Cursive issue then. Which should (maybe at some point) do dynamic doc lookup. Similar to the generate stubs for CLJ.

mfikes17:06:15

Cursive has a GitHub set up for issues; Colin has been focusing on improved ClojureScript support

rauh17:06:57

Yeah I've reported a ton of issue there. I'll wait... no need for special case of ns for now. Was asking since I didn't realize it already had a proper docstring.

dnolen17:06:36

@mfikes I’m also seeing big gains for your method analysis patch esp. if I do so JVM memory settings tweaks

dnolen17:06:26

@mfikes I can’t think of any problematic cases for you patch

dnolen17:06:34

the two passes were only about optimizing self-calls

dnolen17:06:41

running the benchmarks showed no change

dnolen17:06:48

so I’m going to go ahead and apply this

mfikes17:06:49

Cool. I guess there are a lot of nested named anonymous fns

dnolen17:06:08

“running the benchmark showed no change”

dnolen17:06:12

meaning no perf loss w/ your patch

dnolen17:06:15

not compile time

mfikes17:06:22

Right... the emitted code should be the same, while the compiler itself runs faster

mfikes17:06:32

It was motivated by the known inexplicable slowness of for, but perhaps there is enough of that kind of stuff going on for it to add up

dnolen17:06:04

so cool to see these compiler perf patches flow in 🙂

mfikes17:06:56

Yeah... I feel like ClojureScript has somewhat matured and now we are working on icing on the cake 🙂

mfikes17:06:12

@rauh Do you generally blog about Clojure(Script). I'm thinking about a short post about these perf improvements and the theme of maturity/perf optimizations, and would mention your patch if you don't plan to.

rauh17:06:31

@mfikes I don't. And please don't link to my website, I should just take that thing down 😄 Mentioning me by name is fine.

anmonteiro17:06:47

I’m also loving these perf patches go in while I watch from the sidelines

anmonteiro17:06:56

thanks for your work @rauh

rauh18:06:25

FWIW, there is still another easy 20% - 30% for grabs with the shadowing thing by writing it so it's always a single map lookup. Thus maintaining a second map that keeps all those prefixes of the known namespaces. Least hacky would be to just always add the prefix right when the namespace is added to the compiler state.

dnolen18:06:34

the later option sounds reasonable

rauh19:06:01

@mfikes Nice! I predict people will want their hands on this 🙂

rauh19:06:17

Did you make those number up? 😆

mfikes19:06:57

Nope... they are what the compiler spits out. I re-ran them a few times after that, of course, to ensure they were not anomalies. They are very reproducible. 🙂 And yes. 2×, baby!

andrewhr22:06:47

@mfikes about perf, tested master against our app. Shaved almost a minute from our 3 minute build! 👏 👏 👏

mfikes22:06:45

Thanks for reporting @andrewhr