SPM supports Testing, but afaik only “correctness” testing. That is, testing in the Test Driven Development sense.
But is there a way to run performance testing? I’d like to build a library with different sorting algorithms, to learn more about them, and I was thinking how awesome it’d be to be able to test their performance for small and big inputs. But I don’t think SPM provides something like that?
Anyway. I think it would also help in general to test the asymptotic performance of e.g. the Stdlib, parsers and compute engines.
And if there isn’t a SPM-way of doing it, how’d you recommend I do it?
Ohhh. That would allow for the creation of performance testing libraries, wouldn’t it? Because even though the compiler might be able to optimize a “dummy for” that’s actually a benchmark, you wouldn’t want it to do so in this case.
Or am I missing something? I might bc I’m very tired
If that’s what we’re missing maybe we should make a pitch
i have like 3 proposals i have to get around to writing before this one (character integer literals → namespace keyword → contiguous tuples) but ya i’d love to. the syntax i’d like to use would probably be something like @optimize(none) which would also be nice because it would let you specify maximum optimization in debug and Onone builds: @optimize(3)