> does make performance harder to reason about in principle.
the thing is, you don't reason about performance. you measure it.
Once you've obtained measurements, you can make decisions based on the outcome of said measurements.
If the Runtime (and not just talking about clojure here) makes a decision on performance, and it's suboptimal, your measurements _should_ reveal it - for example, by increasing your input size, the performance graph should show a clear inflexion of where this happens.
The real question is whether you _can_ force the Runtime to do something at the programmer's behest, rather than a hidden decision that you cannot control or change. I believe in clojure, you can change the backing data structure, but i'm not sure if you could do it after the fact?
> the thing is, you don't reason about performance. you measure it.
This is only half-true. You do reason about it and later profile. For example, I want to know if my assinment operator in C++ will run in constant time.
the thing is, you don't reason about performance. you measure it.
Once you've obtained measurements, you can make decisions based on the outcome of said measurements.
If the Runtime (and not just talking about clojure here) makes a decision on performance, and it's suboptimal, your measurements _should_ reveal it - for example, by increasing your input size, the performance graph should show a clear inflexion of where this happens.
The real question is whether you _can_ force the Runtime to do something at the programmer's behest, rather than a hidden decision that you cannot control or change. I believe in clojure, you can change the backing data structure, but i'm not sure if you could do it after the fact?