Welcome! Please see the About page for a little more info on how this works.

0 votes
ago in Clojure by

Working with primitive long arrays, we discovered that aset-long is around 25 times slower than aset, when called statically. Presumably this is because of the inline path for aset. Having a specialised aset-longimplies, to me at least, that the specialised version is going to be faster. I'm inferring that aset-lobg was added for improved performance when invoked through a higher order funciton. Would adding an :inline to aset-long et al be considered? or at least a doc string update to warn about the lower performance?

There is an existing issue for this https://clojure.atlassian.net/browse/CLJ-2840

1 Answer

0 votes
ago by

We’ve spent a bunch of time on this and got into some surprising places with it. I am very much hoping all these set functions will be rewritten in next release.

...