home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
progmisc
/
euphor10.zip
/
BENCH.DOC
< prev
next >
Wrap
Text File
|
1993-06-24
|
3KB
|
82 lines
Benchmarks
----------
In this directory we've provided some benchmark programs written in
Euphoria, C, Pascal and QBASIC.
You will need a C or Pascal compiler to compile and run the C or Pascal
benchmarks. QBASIC will be available on your system if you have MS-DOS 5.0
or later. type:
QBASIC /RUN <filename>.BAS
Be aware that we've set the number of iterations for QBASIC to a
lower value, because it is so slow compared to Euphoria.
The .pro files show the output from the Euphoria profiler for a single
iteration of each benchmark, so you can see where the time is actually spent.
The ed editor displays .pro files in color.
We've also included a "filesort.ex" example program that is several times
faster than the MS-DOS sort command, and can handle much larger files.
We encourage you to compare Euphoria against any interpreted or compiled
language that you are interested in. Euphoria is *FAST* -- 10 to 15 times
faster than QBASIC -- but don't take our word for it. Make your own
measurements on your own machine. It's a good way to start programming in
Euphoria.
About The Benchmarks
--------------------
sieve is the classic Byte magazine benchmark first published 10 years ago. It
generates a list of prime numbers using the sieve technique.
shell is a sort of 50 small integers using the Shell sort technique.
database is a series of transactions against a small in-memory data structure
that must sometimes grow or shrink as information is added, deleted or
updated.
sieve and shell involve simple operations on fixed-size arrays of small
integers. database involves integer, string and floating-point operations.
database also requires dynamic storage allocation - something fundamental to
the design of Euphoria.
The version of Pascal that we used was not flexible enough for the database
benchmark, so there is no database.pas file.
When benchmarking Euphoria programs you should include the statement
"without type_check" at the top of the main file. This gives permission
to Euphoria to simplify or remove some runtime type checking.
An unexplained machine exception will still be impossible,
and as always, subscript checking, uninitialized variable checking,
integer overflow checking, stack overflow checking, and all other checks
are still performed.
Comparison with QBASIC
----------------------
We made our measurements on a 486DX-50 with 256K cache. Your results could
vary slightly up or down from ours. We tried both the version of QBASIC that
comes with MS-DOS 5.0 and the version that comes with MS-DOS 6.0. There was no
difference in speed.
-------------------------------------------------------------------------------
Euphoria 1.0 Public Domain Edition (E)
vs
Microsoft QBASIC (Q)
<-- slower ------- RELATIVE SPEED ------- faster -->
sieve
QQQQ
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE (9.7x)
shell
QQQQ
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE (13.5x)
database
QQQQ
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE (14.8x)
-------------------------------------------------------------------------------