1. exw and ex speed

I am running a null stripping routine that is called as part of a legacy
printing application. (Allows old DataGeneral output files to print on PC
printer.)

In .EX the routine processes a 450,000 file in .22 - .27 seconds.  If I use
.EXW, it takes 2.54 seconds.

I need the long filename support of .EXW, but not the overhead.

Any help?

--[ Joe Phillips, Sytems Analyst
--[ Texas Wesleyan University     817-531-4444
--[
--[  "The tongue of the just is as choice silver:
--[   the heart of the wicked is little worth."  Proverbs 10:20

new topic     » topic index » view message » categorize

2. Re: exw and ex speed

Joe Phillips writes:
> I am running a null stripping routine that is called as part
> of a legacy printing application. (Allows old DataGeneral
> output files to print on PC printer.)
> In .EX the routine processes a 450,000 file in .22 - .27 seconds.
> If I use .EXW, it takes 2.54 seconds.
> I need the long filename support of .EXW, but not the overhead.

I tried the following file copy test program:

integer c, in, out
atom t

t = time()

in = open("\\euphoria\\doc\\library.doc", "rb") -- 150K
if in = -1 then
    puts(1, "Couldn't open input file\n")
    abort(1)
end if

out = open("junk", "wb")
if out = -1 then
    puts(1, "Couldn't open output file\n")
    abort(1)
end if

while 1 do
    c = getc(in)
    if c = -1 then
         exit
    end if
    puts(out, c)
end while

close(in)
close(out)

t = time()-t

-- print time to stderr - window will pop up here
printf(1, "%.2f\n", t)

-- wait for user to hit Enter
puts(1, "Press Enter\n")
while get_key() = -1 do
end while

With "ex copy.ex" I got between 0.17 and 0.22.
For "exw copy.ex" I got between 0.19 and 0.50.
(The first run may be longer, because the file hasn't been cached
in memory by the OS yet.)

The time varied quite a bit for exw, while ex was more consistent.
I then tried copying a  4.5 Mb file and got about 8.2 to 8.5 seconds
for both ex and exw.

In the 2.0 alpha release there was a 10 to 15%
speed difference in favour of ex, due to a WATCOM
optimization problem. In 2.0 beta there should now be very little
(less than 1 or 2%) difference in raw compute speed, and I don't
believe there is much, if any, difference in disk I/O speed.

There *is* however a significant difference in speed when text
is written to the screen. WIN32 is much slower in this
department.

Perhaps you are including the time it takes for
the WIN32 Euphoria program's window to pop up,
when it first tries to write something to the screen.
Or maybe it takes longer to open a file across
a network. Or maybe the OS time-slices WIN32 apps
more severely than it does DOS apps.

Regards,
     Rob Craig
     Rapid Deployment Software

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

Search



Quick Links

User menu

Not signed in.

Misc Menu