Re: Changes

new topic     » goto parent     » topic index » view thread      » older message » newer message

Ralf writes:
>>optimizations:
>>     - branch straightening: when the intermediate code has a
>>       conditional or unconditional branch from A to B, and
>>       location B has an unconditional branch to C,
>>       we will now optimize the branch at A to jump directly to C.
>>       (or even to D, if C jumps to D etc. etc.)
>You mean, that things like:
>my_sequence[2][3][4][5]
>Will be as fast as a reference to the most upper level of a
> sequence ?

I mean, if you have something like:

while x < 1000000 do
     x = x + 1
     if s[x] = 99 then
          puts(1, "found 99!\n")
     end if
end while

When s[x] != 99 the <if> would normally
jump down to the <end while>, which would immediately
jump up to the top of the while loop to test x again.
With branch straightening, the <if> will jump *directly*
to the top of the while loop. It saves a bit of time.
This is just one example. There are many others.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu