Questions About Code Golf
Is there any benefit to code golf come run time?
I understand it as an exercise, entertainment, and challenge, but is there any improvement to be had, come runtime, in dropping the byte size on a program?
I can assume interpretation time reduces with less syntax to interpret, so does that mean a commonly implemented interpreted language: bash, lisp, python, et al; would run quicker?
In the same vein, for compiled languages, is there anything to be said about the machine code shrinking as a result of code golf causing the execution to speed up?
Is golf always good programming praxis so long as you can identify the necessary elements of a program?
... golf example : http://codegolf.stackexchange.com/qu...es-and-so-do-i
No to every question.
To reduce the size of machine code through code golf, you would have to do it to the assembler code.
Most "interpreted" languages (like PHP and Python) are compiled to bytecode before being executed. Those that aren't don't have profilers, so there would be no way to tell whether or not they're running faster.
|All times are GMT -5. The time now is 01:53 PM.|