1. User Defined Types

Wolf wrote:

>Would anyone know how much ( real-world ) execution overhead is involved in
>using 'user defined' types like the seq and int types defined in win32lib...
.>.. the real question being, I guess, why aren't they used by win32lib ...
.>... only problem being, of course, the type-check failure in:
i> f int/seq   statements

Timing the same loop, in which x is assigned a random value 100000 times,
using x defined as an object, an atom, and a Eu type yields the  following
times:

object 1.08 sec
atom   1.18 sec
typed 1.65 sec

The ratio remains pretty consistent over numerous runs.
--
Regards,
Irv

new topic     » topic index » view message » categorize

2. Re: User Defined Types

> Timing the same loop, in which x is assigned a random value 100000 times,
> using x defined as an object, an atom, and a Eu type yields the  following
> times:
> object 1.08 sec
> atom   1.18 sec
> typed 1.65 sec
> Irv
how were u createing the random numbers? after all, rand() returns
integers...
i'd be interested to see how the built in integer type fared against these
others...

i also was slightly stunned to see object being faster then atom...then i
realized
the above, that EU was likely making the object into an integer type...

was the benchmark run 'with type_check' or 'without type_check'???
i'd be interested to see the differences, in that -some- type checking
is still performed in the without type_check mode...
--Hawke'



____________NetZero Free Internet Access and Email_________
Download Now     http://www.netzero.net/download/index.html
Request a CDROM  1-800-333-3633
___________________________________________________________

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

3. Re: User Defined Types

On Tue, 29 Aug 2000, Hawke' wrote:

> i'd be interested to see how the built in integer type fared against these
> others...
>
> i also was slightly stunned to see object being faster then atom...then i
> realized
> the above, that EU was likely making the object into an integer type...
>
> was the benchmark run 'with type_check' or 'without type_check'???
> i'd be interested to see the differences, in that -some- type checking
> is still performed in the without type_check mode...
> --Hawke'

Using an integer (123456789)

integer assigned to Object 10000000 times, et: 0.82
integer assigned to Atom 10000000 times, et: 0.9
Integer assigned to integer 10000000 times, et: 0.75
function call result assigned to integer 10000000 times,et: 3.81
integer assigned to EuType 10000000 times, et: 4.58

Your program takes quite a hit, if you write user-defined type checking
routines. Below is a good reason to turn them off after it's debugged...

Same as above, gut with type-checking turned off:

integer assigned to Object 10000000 times, et: 0.84
integer assigned to Atom 10000000 times, et: 0.91
Iinteger assigned to nteger 10000000 times, et: 0.75
Sequence assigned 10000000 times, et: 1.21
Function call return assigned to integer 10000000 times,et: 3.61
integer assigned to EuType 10000000 times, et: 0.85

Looks like "without type-check" is worth doing only if you have user-defined
types.

Using an atom (123456789.01) where legal:

atom assigned to Object 10000000 times, et: 0.95
atom assigned to Atom 10000000 times, et: 1.17
--
--
function call return assigned to object 10000000 times,et: 4.16
atom assigned to EuType 10000000 times, et: 5.35


Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu