Fork me on GitHub
#malli
<
2023-06-14
>
Noah Bogart13:06:10

just for fun, i've been experimenting with -vmap and I can't seem to get personal benchmarks on my own computer to run any faster than with normal mapv. is this a quirk of my machine or maybe an increase in clojure's speed since october 2021?

Ben Sless15:06:41

Could be a function of jvm version, input size, clojure version,CPU architecture Need a comprehensive matrix

👍 2
Noah Bogart15:06:36

yeah that makes sense. i won't dive into all that then, i'll just chalk it up to a quirk of my set up.

Ben Sless15:06:20

It's worth revisiting

ikitommi14:06:03

@UEENNMX0T do you have flamegraphs of -vmap vs mapv?

Noah Bogart14:06:22

i don't have them still, but when i looked, i did see a reduction of stack frames: mapv -> reduce -> persistentvector.reduce etc, compared to vmap's single frame

Noah Bogart15:06:58

i did this on my 2019 macbook pro with clojure 1.11 and java 20, which i suspect is doing a lot of work here. i didn't try it on earlier versions of either

ikitommi15:06:44

I have not run the benchmarks on >java17. Should re-visit the tests with latest Java. There are some of perf tests in malli repo.

Noah Bogart15:06:25

i'll give them a try, see how they do

Noah Bogart13:06:41

or is it more that it's roughly the same speed but provides a consistent api for all "map"-like needs in malli and so you rely on it over everything else