PureBasic and C++
PureBasic and C++
Hello, I am planning to purchase purebasic. I have read man posts regarding blitz and purebasics speed benchmarks. I have not found any benchmarks or tests with C++. Can someone comment speed differences with purebasic and C++.
pentium 90mhz, 32mb ram, 1mb video ram, 1gb hd, windows 95.
If it can run on mine it can run on anything
Staight outta Compton
If it can run on mine it can run on anything
Staight outta Compton
So, does it makes sense to develop UserLibraries in C
when it's possible to do it in PureBasic itself (using TailBite) ?
Is a UserLib smaller if coded in C (for same code) ?
when it's possible to do it in PureBasic itself (using TailBite) ?
Is a UserLib smaller if coded in C (for same code) ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
It depends, if you create a userlib from a opensource lib though not from your code, you have not the choice.
Then if you talk about choosing between creating a userlib from your code in C or PB, personnaly, i prefer to code it in PB, it save me a lot of time and show that "nothing" is not a PB keyword
(except some very low level stuff like a OS)
Then if you talk about choosing between creating a userlib from your code in C or PB, personnaly, i prefer to code it in PB, it save me a lot of time and show that "nothing" is not a PB keyword

OK..since speed is the same in both c++ and pureB can I program a function like changing an IP address or computer name and have it reboot the system automatically? Can this type of stuff be done without reverting back to C++ dlls?
pentium 90mhz, 32mb ram, 1mb video ram, 1gb hd, windows 95.
If it can run on mine it can run on anything
Staight outta Compton
If it can run on mine it can run on anything
Staight outta Compton
Im sure it could easily, check this link out:luke101 wrote:OK..since speed is the same in both c++ and pureB can I program a function like changing an IP address or computer name and have it reboot the system automatically? Can this type of stuff be done without reverting back to C++ dlls?
http://www.codeguru.com/Cpp/I-N/network ... php/c2473/
PB should be able to do these steps no problem, then use:
Code: Select all
ExitWindowsEx_(#EWX_SHUTDOWN, #Null)

@KarLKoX:
Sorry, i have to disagree about some infos. Since v4 nearly all PB libs are coded in C and no longer in ASM!
VC++ is able to produce smaller and more optimized output as some ASM written stuff. Btw, with VC++ you can produce smaller and better optimized stuff. (here the VC++ compiler is very intelligent to produce great output). ^^
@Flype:
Because you can create smaller and more optimized output code! Another and clean aspect is, coding stuff in VC++ may be more stable as coding stuff in PB (tailibite) where are "some hidden" compiler bugs inside and later inside your PB created libs ^^
@luke101:
you can do a lot stuff with purebasic. you can write some own routines using API calls and/or using DLLs.
Sorry, i have to disagree about some infos. Since v4 nearly all PB libs are coded in C and no longer in ASM!
VC++ is able to produce smaller and more optimized output as some ASM written stuff. Btw, with VC++ you can produce smaller and better optimized stuff. (here the VC++ compiler is very intelligent to produce great output). ^^
@Flype:
Because you can create smaller and more optimized output code! Another and clean aspect is, coding stuff in VC++ may be more stable as coding stuff in PB (tailibite) where are "some hidden" compiler bugs inside and later inside your PB created libs ^^
@luke101:
you can do a lot stuff with purebasic. you can write some own routines using API calls and/or using DLLs.
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
-
- PureBasic Expert
- Posts: 2812
- Joined: Fri Apr 25, 2003 4:51 pm
- Location: Portugal, Lisbon
- Contact:
Those ain't bugs! They are featuresva!n wrote:@Flype:
Because you can create smaller and more optimized output code! Another and clean aspect is, coding stuff in VC++ may be more stable as coding stuff in PB (tailibite) where are "some hidden" compiler bugs inside and later inside your PB created libs ^^

Personaly i can't complain, all my libs work, and when they don't it's my own coding problem, not PB!
You misunderstood what i was talking about, i am not talking about pb's libs, those wich are provided with purebasic but third parties userlib, those coded by you or me.va!n wrote:@KarLKoX:
Sorry, i have to disagree about some infos. Since v4 nearly all PB libs are coded in C and no longer in ASM!
VC++ is able to produce smaller and more optimized output as some ASM written stuff. Btw, with VC++ you can produce smaller and better optimized stuff. (here the VC++ compiler is very intelligent to produce great output). ^^
VC++ is not the best compiler for optimized code, just see the rounding stuff produced by it ! I am a very beginner in asm (i can read it) and i successfully coded a far better rounding asm routine ... this is just an example, VC++ do some weird things called optimisations but the best optimisations comes from the coder, i am not those who say they optimise their code when they only play with the compiler settings.
Btw, comparing a compiler wich is used for a longer time with a quite young one prove that PB is keeping the good way, i am confident that it will beat the master
