Re:Learn by Wrapping
by thecatster on Wednesday February 02, 2022 @02:50PM
(#30183039)
I fairly often do something like this. I have a simple CLI project that I write that hits a few web APIs and reads a file. It's fairly simple, but these are the kind of basic things I want to know in each language.
I then benchmark it and go and try to make it as idiomatic according to that languages style.
On the flip side of this, I always end up wearing the performance hat on every project I’m on, and one thing I keep meaning to do is to write myself a benchmark/test suite that asserts some things I “know” about the behavior of the language. Why? So that I can run it again on every release to make sure that the slow but pretty solution didn’t suddenly get 10x faster or the fast but ugly one didn’t get 2x slower to fix a security hole, narrowing or flipping the heuristic for selecting the correct solution. Speaking of, I really miss jsperf even though half the benchmarks there were misleading.