Re:Fibs, Lies, and Benchmarks (2019)
by AtlasBarfed on Wednesday March 04, 2020 @02:32PM
(#22487103)
"The microbenchmark is no longer measuring call performance, because GCC managed to reduce the number of calls. If I had to guess, I would say this optimization doesn't have a wide applicability and is just to game benchmarks. In that case, well played, GCC, well played."
Loop unrolling and/or equivalent in recursion is a very basic optimization.
It's weird that an optimizing compiler optimizes away something that he is somewhat arbitrarily benchmarking, and he declares it something specifically targeted at only improving artificial benchmarks.
"In Guile you can recurse however much you want."
Sooo... if your recursion depends on accumulated stack data, which is what most non-tail-recursive recursions want to do... can you recurse however much you want? This seems like a disingenuous statement. Every recursion algorithm cannot be magically refactored to perfectly tail recursion.
When I was a wee CS student, I heard that any recursion algorithm can be converted to a loop. With puzzlement I asked the prof who said that about something that pretty clearly needed stack-state, and he further qualified it with "well, if you have a stack datastructure in the loop."
There seems to be pervasive overclaims here, and narcissistic self-focus. Doesn't inspire confidence in the language.
Loop unrolling and/or equivalent in recursion is a very basic optimization.
It's weird that an optimizing compiler optimizes away something that he is somewhat arbitrarily benchmarking, and he declares it something specifically targeted at only improving artificial benchmarks.
"In Guile you can recurse however much you want."
Sooo... if your recursion depends on accumulated stack data, which is what most non-tail-recursive recursions want to do... can you recurse however much you want? This seems like a disingenuous statement. Every recursion algorithm cannot be magically refactored to perfectly tail recursion.
When I was a wee CS student, I heard that any recursion algorithm can be converted to a loop. With puzzlement I asked the prof who said that about something that pretty clearly needed stack-state, and he further qualified it with "well, if you have a stack datastructure in the loop."
There seems to be pervasive overclaims here, and narcissistic self-focus. Doesn't inspire confidence in the language.