3 ms·
Software development needs to be driven by user needs. Clearly the best action in this scenario is to bundle in telemetry code that reports back which numbers a
by Centigonal 3y ago
Software development needs to be driven by user needs. Clearly the best action in this scenario is to bundle in telemetry code that reports back which numbers are used with this program, assemble a ranking of the most frequently compared numbers in the real world, and use that to order the comparisons in v2 of the program.
- satiric 3y agoOf course the modern "scaleable" solution is to ask ChatGPT if the number is even or odd, and then print ChatGPT's response.
- constantly 3y agoUsing selenium and chrome webdriver under the hood to do so, as well.
- chrismorgan 3y agoIt’s worth noting that good compilers can actually do a version of this: it’s called profile-guided optimisation <https://en.wikipedia.org/wiki/Profile-guided_optimization https://en.wikipedia.org/wiki/Profile-guided_optimization>. Not many projects use it, because it’s generally a bit of a bother (build a special version, run your profiling, then build everything all over again), but Firefox gets good mileage out of it. My vague recollection is a typical sort of speedup of 5%.
- eviks 3y agoDon't forget to remove the least used 1% of the numbers to make it leaner!