Post by Bob Zale Post by H-Man
Maybe show your source in VB.NET, keeping it simple of course, and maybe
someone can port it to PB and upload an exe somewhere. It would be kinda
cool to see others get involved to, like C and C++, other basics like
FreeBasic, and something like FreePascal or Delphi, for a complete overall
picture of where you're at speed wise.
Marc posted an interesting little benchmark on the PowerBASIC Forums.
Now, we'd never suggest that a simple benchmark tells everything about
a compiler... but it's a good start. I would invite our friends to
visit and take a quick look at http://powerbasic.com/support/pbforums/showthread.php?t=41410
It seems that your compiler of choice (Pure Basic) turned in a nice
elapsed time of around 29000 ms. But VB.NET ran it in just 11000 to
13000 ms. Of course, my personal favorite (PowerBASIC) performed
fairly well at just 9000 ms, and by applying optimization options
(like automatic FLOAT REGISTER VARIABLES), the elapsed time was
reduced to almost 5000 ms.
Bob, this is interesting, thanks for posting it!
Following the example John Gleason gave using your MID$ statement, I
modified the PureBasic example to also directly access the string locations
as opposed to building the string (I didn't touch the match part. On the
modest machine I'm working at right now (Athlon64 2.21GHz) John's example
benches in at about 5750mS where the PureBasic benches in at about 5950mS.
Executing from the IDE in PureBasic does not produce the fastest exe file,
for this one should compile and run outside of the IDE (for a fair
comparison). This kinda tells me that PureBasic has some work to do in
optimizing string handling.
Kudos to PowerBasic for their efficient string handling. The latest docs I
can find are for PB Win 8. Is the BUILD$ function something new?
I suppose .NET can be pretty fast if you exclude the time it takes for the
massive framework to load.
Either way, it's fun to make some comparisons.