1. Re: type string

Ah, I see what the difference is now... After commenting out the trace =
(1), I saw similar--albeit faster--results on my P2 233MHz (under 2.1); =
string13 won.

But in the benchmark I used, I eventually had cut out the tests for junk =
strings, and only tested the types against obviously good strings; up =
until that point, taking out the test hadn't altered the times enough to =
change the speed order. I had also tested against a rather short string =
and a somewhat longer string.

So, first I decided I'd only test a (short) valid string. By putting =
test_set =3D {"hello"} (and test_set =3D {"hello, what about a long?"}) =
right before the type tests in your benchmark, the speeds dropped =
dramatically... and string13 came out quite a distance behind.

Next, I removed that modification, and then put in a different one; =
before test_set was filled, I inserted a line: base_str =3D "hello", so =
now all of the invalidity tests were there, but with shorter strings. =
The scores were closer, but string13 was still behind string12.

Apparently, it takes rather long strings for string13 to surpass the =
other types. At least, I would consider those long... perhaps others =
frequently use strings of that size (right now I've only used strings =
that, at most, contained one line's worth of characters.)

Hmmm, and that's a keen observation about 2.1 optimatizations. I may =
start running these tests on both versions 2.0 and 2.1 from now on, just =
to satisfy my own curiosity.


Rod Jackson

----------
From:   ddhinc[SMTP:ddhinc at ALA.NET]
Sent:   Wednesday, March 17, 1999 3:28 PM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Re: type string

Rod Jackson wrote:
>Christopher, are you using Daniel's benchmark program? I haven't used =
that yet,
>I think it might help if I started though...

No, I made my own benchmark because Daniel's benchmark includes
alot of code which relies on version 2.1 (short-circuiting etc.).
I'm still using 2.0 at the moment. This could also account for
some benchmarking differences in comparing string12() to string13()
due to some other optimizations made in 2.1 itself.

Anyway, here's the method I used to compare the two type functions:

----------------------------------------------------------------
<code snipped for space; see prior post>
----------------------------------------------------------------

Giving results like this on my P90:

C:\EUPHORIA>ex string2
String12: 21.2838
String13: 13.9119

I'd be interested in knowing if this yields quite different results
under version 2.1 vs. 2.0.

Thanks,
Christopher D. Hickman

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu