@p You made claims this was faster. Do you have benchmarks between this and the oldway to see?
@p
i do t need anything. A proper benchmark woukd be nice to back uo your claim, but if its just a guestimate then it is what it is. I just wanted to know where the xlaim came from and if it had any weight.
Ya know what is also CS 101, writing unit tests and benchmarks to go along side code that is written, even when it is known to be an improvement... Why? Simple, it helps us track the performance improvement and also help us tweak future modifications to the code and know when we make mistakes other than what we intended.
No one is saying your intent isnt justified, this is just how you write good code, that includes good tests not sure to prove out your current code, but more importantly as a measure for future tweaks to the code.
Good job and thanks for the hard work.
The thing is, optimisation is a tricky beast.
> that'd be like devising and running a benchmark to determine that a search index is faster than a full scan of the disk
I have seen many times where search indexes can be slower than full scans, just as sometimes hash tables can be slower than linked lists under the right circumstances.
I am not saying that applies here, I am not saying you are under any obligation to do a benchmark, I am not saying this is bad work in anyway.
All I'm saying is a benchmark would have been interesting and I dont rule out the possibility that under certain conditions it might show a slow down and in others a speedup, either of those might be marginal, and it would be interesting to see where the tradeover occurs and just how much of an improvement you get as various conditions grow.
Again not saying you need to do this to determine it was a good move. Just saying it would have been interesting to see, and the benchmarks in general useful for future diagnostics.
On the projects I run I like to create along side my unit tests extensive benchmarking. As features or fixes are added we watch the benchmarks change along side it, and it provides a similar CI tool as unit tests might. So I generally find it a worthwhile effort even if it may not be critical in knowing that the current feature set makes sense performance wise.
LOL true that. I work on some really advanced projects that most even advanced CS guys dont seem to be able to understand or touch (though they do use the libraries)...
I think ive gotten to the point where I dont realize how the vast majority of CS professionals really never even learned the basics, let alone the advanced stuff.
Frankly I doubt many CS noobs would understand what P is doing, let along the need for CI that includes both benchmarks and tests.
That being said, CS 101 is dumbed-down trash that students should have the option to test out of as a required pre-req.