really newbie question : does PB functions faster than API ?

Just starting out? Need help? Post your questions and find answers here.
newbie
Enthusiast
Enthusiast
Posts: 296
Joined: Tue Jul 29, 2003 5:47 pm
Location: FRANCE
Contact:

really newbie question : does PB functions faster than API ?

Post by newbie »

I'm in front of a choice :

i have already converted a Visual Basic code into PureBasic code, before asking my question, for whose interested, i show you my results :

VB app :
* size = 27Ko (+ DLLs = 2.87MB)
* RAM = 2 396Ko
* Virtual Memory = 1 496 Ko
-> total = 3.8MB

PB app :
* size = 46Ko
* RAM = 612 Ko
* Virtual Memory = 876 Ko
-> total = 1.4MB

Am I happy with PB ? yes of course :D

I very like optimization, even when the advantages are small, and i would want to know if the fact of replacing the existing API to write/read "ini" files with PB integrated function would be faster or not ?

I'm using "WritePrivateProfileString_" and "GetPrivateProfileString_" and i saw that PB offers "ReadPreferenceString" and "WritePreferenceString" but need to open/close the file, is it better ?

P.S : sorry for the title, i don't know if it is "are PB functions faster" or "does PB functions faster" :roll:
- Registered PB user -

Using PB 4.00
Fred
Administrator
Administrator
Posts: 18254
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

In fact, for this case PB functions doesn't use the API, so you will have to do some benchmarks to see. But in most of the case, the API is used in every functions, so you will probably have exactly the same timing.
D'Oldefoxx
User
User
Posts: 30
Joined: Wed Aug 06, 2003 5:52 pm
Location: Florida, USA

What does What?

Post by D'Oldefoxx »

I think that if you look at the Help file, you can get some idea of which commands rely on either Windows API or DirectX calls, because those commands will indicate that they are only available under Windows. For
commands that span more than one operating system, either Fred did a roll-your-own approach, or found comparable capabilities in each of the systems involved. That is just a logical assumption that would seem reasonable at the onset.
Has-been Wanna-be (You may not like what I say, but it will make you think)
Post Reply