in reply to Re^5: evil code of the day: global stricture control
in thread evil code of the day: global stricture control

No, we can't.

that's my English... I meant "discuss we or not, no consensus will be reached"

As for optimizations by removing code - I do not agree.

Usually naive shorter implementation will be slower than "advanced" algorithm, like replacing bubble-sort with balanced tree will gain performance with a pay of complex algortihm.

And here is typical example of other type of optimization by making code larger.

in the code excerpt below:

for (;length;) { read (FIN,$_,1_000_000); m0: $_ .= <FIN> unless eof FIN; if (/\\[\r\n]$/) { goto m0 unless eof FIN; } s#(/Title\s*)\(((?:[^\\\)]|\\.)+)\)#$1.repair_title($2)#eg; print FOUT; $len += length; print STDERR "$len\n"; }
I was forced to replace processing by chunks of 1_000_000 because, when it was simple s/.../.../g, then quite often 1Gb of memory was eaten and still not reached result.