I've had a ton of fun doing this over the years, it's like metagaming the puzzle. I'm not great at it but I love it when I can pull it off.
I also have used Benchee (Elixir benchmarking library) to run comparisons between naive/bad algorithms that I wrote initially and then the "correct" method after - always kind of edifying to see the difference between log n and n ^2 or whatever actually visible in the benchmarks.