in reply to Re^2: Optimizing Perl Code - single versus double quotes really that important?
in thread Optimizing Perl Code - single versus double quotes really that important?
Well...
perl -MO=Concise,-exec -e '$x=qq{a $b c}' 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ 3 <$> const[PV "a "] s 4 <#> gvsv[*b] s 5 <2> concat[t3] sK/2 6 <$> const[PV " c"] s 7 <2> concat[t4] sKS/2 8 <#> gvsv[*x] s 9 <2> sassign vKS/2 a <@> leave[1 ref] vKP/REFC -e syntax OK perl -MO=Concise,-exec -e '$x=q{a $b c}' 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ 3 <$> const[PV "a $b c"] s 4 <#> gvsv[*x] s 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC -e syntax OK
So obviously there is some minor difference at compile-time. (Which would be the only difference I expect.) Once compiled equivalent expressions produce equivalent op-code, it's just that the compile process isn't exactly the same.
Unlikely to be noticeable though, and really irrelevant to my original reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Optimizing Perl Code - single versus double quotes really that important?
by ikegami (Patriarch) on Feb 05, 2009 at 18:30 UTC | |
by DStaal (Chaplain) on Feb 05, 2009 at 18:45 UTC |