1. .FLI Player is now twice as fast

I hacked away on Peter Blue's .FLI code and
managed to get it running twice as fast. It has
gone from about 4 frames per sec. up to now 8 frames
per second on a 486 DX-50.
The new version is on the Official Euphoria page.
(It still won't run any .FLI's that it wasn't able to before)

I did several small things, plus one big thing to speed it
up. The big thing was to change the algorithm slightly
so it calls pixel() fewer times, but with more pixels to print
each time. I believe a call to pixel() carries
an overhead of about 30 units, where one unit equals the
time to print one extra pixel (in a batch) on the screen.
So it's a big win to do a long horizontal line of pixels at a time,
rather than some short contiguous pieces.

Rob Craig
Rapid Deployment Software

new topic     » topic index » view message » categorize

2. Re: .FLI Player is now twice as fast

Robert Craig wrote

> I hacked away on Peter Blue's .FLI code and
> managed to get it running twice as fast. It has
> gone from about 4 frames per sec. up to now 8 frames

I added a slight modification to Play-fli.e in procedure ByteDelta()

I replaced

for c = 1 to byt do
  h = h + 1
  hz[h] = getc(ifc)
end for

by

for c = h to h+byt do
  hz[c] = getc(ifc)
end for
h = h + byt

this should give a slight improvement in speed.

Jacques Deschenes

new topic     » goto parent     » topic index » view message » categorize

3. Re: .FLI Player is now twice as fast

Jacques Deschenes writes:
> I replaced

> for c = 1 to byt do
>  h = h + 1
>  hz[h] = getc(ifc)
> end for

> by

> for c = h to h+byt do
>   hz[c] = getc(ifc)
> end for
> h = h + byt

> this should give a slight improvement in speed.

Good idea Jacques. Of course you really meant:
  for c = h+1 to h+byt do

Rob Craig
Rapid Deployment Software

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu