What is the real PureBasic speed ?
What is the real PureBasic speed ?
Hi all,
If I use a PC and Win XP pro (sp3)
If I put assembler on 100% on the CPU/GPU speed scale
and I put C++ on 75%
where can I put PB on this scale ?
This is all about 3D gaming speed.
I know there is also the quality of writing programs !!
Thanks,
Marc
If I use a PC and Win XP pro (sp3)
If I put assembler on 100% on the CPU/GPU speed scale
and I put C++ on 75%
where can I put PB on this scale ?
This is all about 3D gaming speed.
I know there is also the quality of writing programs !!
Thanks,
Marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: What is the real PureBasic speed ?
Probably there is no valuable speed gain in writing a graphical (DirectX/OpenGL) game in asm vs C/C++ or PB.
In many games, if you take the Render() function and substitute it to an empty function the FPS count will jump at least tenfold. Textures swapping in/out from physical memory and to/from GPU memory and the actual drawing is where time is spent. So the efficiency of the language is quite irrelevant.
Different is if you have complex physics, sound processing and the like, running on your CPU.
Or if you want (and can!) write a Quake 1 clone with a software renderer.
I would say you can reach the same performance level in PB as in any other comparable language.
So if your question is: using a BASIC language, and PB in particular can act as a drag on performance ?
The answer is no.
Anyway, quality of code is what make the difference (as you said).
Many commercial games exhibiting the A.I. of disturbed amoeba could be written in Visual Basic with a powerful GPU.
Nice site btw! I envy you the possibility (and the ability) to do all that mechanical stuff.
In many games, if you take the Render() function and substitute it to an empty function the FPS count will jump at least tenfold. Textures swapping in/out from physical memory and to/from GPU memory and the actual drawing is where time is spent. So the efficiency of the language is quite irrelevant.
Different is if you have complex physics, sound processing and the like, running on your CPU.
Or if you want (and can!) write a Quake 1 clone with a software renderer.
I would say you can reach the same performance level in PB as in any other comparable language.
So if your question is: using a BASIC language, and PB in particular can act as a drag on performance ?
The answer is no.
Anyway, quality of code is what make the difference (as you said).
Many commercial games exhibiting the A.I. of disturbed amoeba could be written in Visual Basic with a powerful GPU.
Nice site btw! I envy you the possibility (and the ability) to do all that mechanical stuff.
"Have you tried turning it off and on again ?"
Re: What is the real PureBasic speed ?
You just cant scale it as simple as that.marc_256 wrote: If I put assembler on 100% on the CPU/GPU speed scale
and I put C++ on 75%
where can I put PB on this scale ?
In some cases it's slower than C++ in some it's even faster. Actualy you cant even compare it to C++, because C++ is just the language. You would need to compare it to a C++ compiler. There are differences between different C++ compilers.
If we talk about GPU, there is probably no difference as the code that runs on the GPU isnt compiled by PureBasic.
Re: What is the real PureBasic speed ?
For PRACTICAL purposes I wonder if it does matter... 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- netmaestro
- PureBasic Bullfrog

- Posts: 8453
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: What is the real PureBasic speed ?
Well, my girlfriend says it's over in 1:05. Just don't tell my wife.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: What is the real PureBasic speed ?
hello,
The nice thing in PB is that I can write the most important parts in asm.
Marc
Well, if I start to write my own 3D engine/renderer it does matter.For PRACTICAL purposes I wonder if it does matter...
The nice thing in PB is that I can write the most important parts in asm.
WAW... thats what I need...I got it up to 270 km/h on the 401 yesterday..
my girlfriend says it's over in 1:05.
Marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: What is the real PureBasic speed ?
At about 1:27 you can see the speed:
http://www.youtube.com/watch?v=Dw4zn-qw1oM
and about 1:50, you can see Ogre in action:
http://www.youtube.com/watch?v=AzjRbA8F ... re=related
http://www.youtube.com/watch?v=Dw4zn-qw1oM
and about 1:50, you can see Ogre in action:
http://www.youtube.com/watch?v=AzjRbA8F ... re=related
PureBasic for Windows
Re: What is the real PureBasic speed ?
Actualy, no.marc_256 wrote: Well, if I start to write my own 3D engine/renderer it does matter.
The nice thing in PB is that I can write the most important parts in asm.
If it isnt a software renderer it doesnt matters as the performance critical stuff is executed on the GPU anyway.
- ultralazor
- Enthusiast

- Posts: 186
- Joined: Sun Jun 27, 2010 9:00 am
Re: What is the real PureBasic speed ?
I get about the same benchmark with 4.51 as I do with mingwC/OpenGL and NASM/OpenGL loading collada models, processing input and doing some shader and bone animation stuff. They all generate about the same PE, you can mess with alignments and IAT+reloc data in all of them to save some memory, as well as stripping some stuff in code section.
Most times I see someone try to use the low-level language theory they either end up with vaporware, or poorly managed code that is worse than all the alternatives..Assembly coding is an art when you're talking about complex code algo..same with inline assembler.
Most times I see someone try to use the low-level language theory they either end up with vaporware, or poorly managed code that is worse than all the alternatives..Assembly coding is an art when you're talking about complex code algo..same with inline assembler.
so many ideas so little time..
-
DarkDragon
- Addict

- Posts: 2348
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: What is the real PureBasic speed ?
marc_256 wrote:Well, if I start to write my own 3D engine/renderer it does matter.For PRACTICAL purposes I wonder if it does matter...
bye,
Daniel
Daniel
Re: What is the real PureBasic speed ?
Oi! Good word to impress my friendsasymptotical
(Edit) It doesn't mean anything dirty, does it?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
- ultralazor
- Enthusiast

- Posts: 186
- Joined: Sun Jun 27, 2010 9:00 am
Re: What is the real PureBasic speed ?
A tool exists that shows dissasembly that is colored based on it's efficiency. I forget the name of it though. I just used kernel stats.
so many ideas so little time..
-
DarkDragon
- Addict

- Posts: 2348
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: What is the real PureBasic speed ?
blueznl wrote:Oi! Good word to impress my friendsasymptotical... well, the few that are left
![]()
(Edit) It doesn't mean anything dirty, does it?
bye,
Daniel
Daniel
Re: What is the real PureBasic speed ?
There are some very cool assembly projects like MenuetOS and a lot of games for old computer and console systems.ultralazor wrote: Most times I see someone try to use the low-level language theory they either end up with vaporware, or poorly managed code that is worse than all the alternatives..Assembly coding is an art when you're talking about complex code algo..same with inline assembler.
Inline assembler is very usefull because PB does not optimize and does not use any SIMD instructions. It's very easy to beat PB code if you know some basic assembly optimization technics.