What compiler settings were used? VB apps can be speeded up by as much as 250% by using the advanced compiler optimizations (VBPJ, Sept 97).
Source code would help too; that way the various language pros could offer suggestions to improve the accuracy of the tests.
Mark
------------------
Announcement
Collapse
No announcement yet.
Speed Test Coming:
Collapse
X
-
Guest repliedCompiler Test Results:
i was curious so i tested PB/DLL 6.0 versus VB (Visual Basic 6.0), BCB (Borland C++ Builder 3.0), and VC++ (Visual C++ 6.0). i optimized all three compilers' output for speed and used the same variable types. i used my 366MHz celeron laptop (Dell) with 64MB.
test #1: 3 nested loops (255 each):
sin() cos() tan() functions inside
test #2: 3 nested loops (255 each):
sin(a)*a+cos(b)/b-atn(c) inside
test #3: 3 nested loops (255,255,1000):
A*B-C/A inside(long math)
results in seconds: (test #1), (test #2), (test #3)
PB : 17s, 18s, 8s
VB : 37s, 67s, 132s
BCB: 46s, 46s, 7s
VC : 22s, 23s 7s
conclusion: with this first round PB did /quite/ well... good job guys ! notice that RAD (BCB and VB) comes with a price. i was especially surprised at BCB... C++ doesn't always equate with speed. i was discussing these results in chat and one guy got so offended he left... oh well, reality is shocking. i am unsure why VB did so terrible at long math... i'll try fooling with it some more but i'm not holding my breath. VB is *great* at creating the GUI but its very slow at processing data... yeah, i know, what a shocker.
with today's incredibly fast processors it makes sense to use PB/DLL and speed up the time critial areas with:
1 - inline asm
2 - register variables (4 ##, 2 & per function)
3 - pointers usage
4 - BYVAL usage (vs BYREF)
5 - decrease number of LOCAL variables in functions
6 - use LONG data type (&, 32bit)
7 - cache values (save as variable versus recalculating)
8 - improve your algorithm, ESPECIALLY those inner loops !
9 - threads: i recently cut down a 50 minute program to 4 minutes by creating 50 threads, each of which asks a server for information... i'm sure my ISP loves me now.
i plan on doing other tests and possibly adding MASM32 to the list. take care people.
dr phil
ps please add to PB/DLL 7.0 wish list: #define command !
------------------
Leave a comment:
-
Firstly, I hope that you will publish the source code used in your tests... the results should be interesting. What sort of test are you going to run? Numerical? Procedural? Looping? Something else? All of the above? Don't forget to profile the test system you are going to use.
Finally, is "Phil" your given (christian) name? If it is, you need to reregister to conform to the rules of this BBS (we require a last name/surname).
Thanks!
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment:
-
Speed Test Coming:
i will post speed test of PB vs BCB vs VB vs VC++Tags: None
Leave a comment: