in reply to Re: Teach him a lesson with facts
in thread Teach him a lesson with facts
Perl is very difficult to optimize. For example, take the code
(Take my code, please!) In C, the equivlent code would be equivlent to x=1000001. In perl, you can't do that optimization, because $x might be tied, in which case, writing to it might have side effects. In C, you'd have to declare that, using the volitile keyword. In perl, there's no way to tell, so the compiler can't assume anything.for (0..1_000_000) { $x=$_+1; }
|
---|