View Single Post
Old 05-25-03, 01:30 PM   #63
Behemoth
radeon 9800 pro
 
Behemoth's Avatar
 
Join Date: Apr 2003
Location: Darkness Falls
Posts: 841
Default

this is one way of shuffling instructions that manually reduces workload:

original program:

do a;
do b;
if (c == true) {do d;}
else { do e;}
do f;
do g;
do h;
do i;
do j;


by studying the scene, c is always true, instructions other than a,d,h have no visual effect in this scene, let me make a faster version of a mathematically functionally visually identical program of above by "shuffle instructions":

do a;
if (c == true) {do d;}
else {do e;
do b;
do f;
do g;
do i;
do j;
}
do h;



original program does 8 instructions and 1 comparison per pass.
my mathematically functionally visually identical program does only 3 instructions and 1 comparison per pass. what an optimization!

shuffle instructions can be very cheaty imho

p.s. if my post offend you in any way, i am sorry, i am just here to share my point of view
Behemoth is offline   Reply With Quote