integer too slow

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
Originally posted by theogott

However if there would be ideas to use for example SSE (or a SSE-Switch for SSE-Optimization) in PB then I'd be PRO cause I have it ...
:)

I don't know about the code that PureBasic generates, but from v3.60 the library functions can have specially optimised versions for different CPU architectures. I think you select at compile time which one you prefer to use.

Of course, it requires that the library authors write code that is optimised for each architecture.


--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.62, external editor)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by theogott.

For all those "Speed Optimizers" here are some links:

1^. CodeAnalyst is a software tool designed to assist software developers in optimizing their software for AMD processors. CodeAnalyst 1.2 provides three main methods for analyzing software: Timer-Based Profiling, Pipeline Analysis, and Performance Monitoring.

Link:
http://cdrom.amd.com/devconn/AMDCodeAnalyst.exe

Info: http://www.amd.com/us-en/Processors/Dev ... 04,00.html


Code-Optimization-PDF (Athlon 32 bit):
http://www.amd.com/us-en/assets/content ... /22007.pdf

For 64 bit see here:
http://www.amd.com/us-en/Processors/Dev ... 44,00.html


Intel:


1. http://developer.intel.com/design/penti ... 248966.htm
2. http://www.sandpile.org/docs/intel/sse.htm








*************************
The best time to do things is now !
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mdkrsta.

@theogott
First to this threads Subject: INTEGER TOO SLOW.
As a statement its simply wrong.
PB claims to be one of the fastest Basic compilers available. If BB is twice as fast, than PB is too slow and can be optimized.
Secondly I am really not shure if that is the place where to spent the time for developers.
There are Basic compilers out there with nearly thousands of commands (DarkBasicPro, PowerBasic, VisualBasic). I think PB was designed to create faster and smaller executables than these slow dialects. No developer wants his apps/games to be slow. The more speed you have the more features you can add.
1. Integer-Speed is highly CPU-dependent.
2. New CPU, the carefully done optimizations revert back into opposite.
Not necessarily, depends on what you are changing. Because of pipelining and other features of modern CPUs you definitely have to test your improvements to be faster on most (or all) CPUs.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Amiga5k.

Hello, mdkrsta,
There are Basic compilers out there with nearly thousands of commands (DarkBasicPro, PowerBasic, VisualBasic). I think PB was designed to create faster and smaller executables than these slow dialects. No developer wants his apps/games to be slow.
I agree with you on the slowness of DarkBasic and Visual Basic, but Powerbasic does not belong in that group. It is the fastest basic I've ever tried, and utterly stable. But the downside is that it is lacking any built-in graphics or sound commands whatsoever :( (You have to use the GDI or a 3rd party library such as Fastgraph).

Also, speed is important, but nowadays with 1ghz processor becoming the low-end standard it's almost moot now unless you're writing a real-time 3D engine or some such thing. "Slow" is relative (One man's 2ghz "slow" is another man's 700mhz "freakin' fast") :)

I think there's a lot more to this than we think (other factors we're not aware of - ie Windows performance, etc)

Russell

***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by geoff.

Geoff:
Simple math on a 2D float array.
This benchmark runs nearly twice as fast using my 1993 GFA Basic 16 bit compiler with 64 bit floats compared with PureBasic 3.61 and 32 bit floats
But now I have completed a complex image processing application that does float arithmetic on large arrays. This runs 2 or 3 times faster than the GFA equivalent. Perhaps because of the paging overhead for 16 bit large array access.

Whatever the reason, I am delighted with this result.

Thanks Fred for the impressive performance!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by theogott.

... Or how could we say ?

SPEED is RELATIVE.
Features are there - or not.

I waste more time in sorting procedures then I losse in
using Integer math that could be 3/1000th faster (maybe !).



*************************
The best time to do things is now !
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ricardo.
I agree with you on the slowness of DarkBasic and Visual Basic, but Powerbasic does not belong in that group. It is the fastest basic I've ever tried, and utterly stable. But the downside is that it is lacking any built-in graphics or sound commands whatsoever :( (You have to use the GDI or a 3rd party library such as Fastgraph).
Power Basic is a very good compiler: Fast, stable, reliable... I think its the BASIC compiler with more sales (of course after Visual Basic).
The price is high, need to buy every new version (every year), etc, etc, etc.

I think that PureBasic can become a great competitor for VB and PowerBasic. Thats something that Blitz, DarkB, etc. CANT achieve.

If PureBasic has more marketing at this moment could be largely well known and largely buyed.

My point of view is that now is the moment to not update every 2 months, its time to start developing hundreds of snippets and a tutorial. If the downloaders could find a way to understand PureBasic faster, the orders will increase a lot.

Remember that usually a downloader test every application for 3 to 5 minutes, if they like it then they go deeper if not its uninstalled. PureBasic need to focus on the first experience of the downloader, open the Visual Designer and open a Tutorial with many snippets at start could make the difference.

http://www.purebasic.com still need a lot of more info, examples, etc, etc, etc. if you cant find the word 'visual basic' or 'basic' or 'compiler' (and many others) many times in the site, then its not search engine friendly.


Best Regards

Ricardo

Dont cry for me Argentina...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Amiga5k.

I agree with Ricardo for the most part: Purebasic has what it takes to compete except for a few crucial things. Marketing is one, but that takes money (or a knockout demo game or app that really blows people away). So, what can be done to help put PB "on the map"?

A user guide is being written now, which is vital IMHO to help the PBdemo-downloader understand what he/she is doing. Lots and lots of example code are, of course, very helpful as well (especially if they are extremely well commented...which, unfortunately, is not always the case). Is the demo of PB available from the various shareware/commercial demo sites out there, such as http://www.zdnet.com or http://www.tucows.com ? If not, it should be. (I think this is a free service). There are many many others, of course (just do a search for "shareware" and you'll get a lot of hits).

The price is right and the power is excellent. Now all we need is for the rest of the world to find out about it! :)

Russell

***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by blueb.

Good idea Ricardo,

If everyone 'donated' 2 well documented applications to PureBasic's web site (let's see 2000 users X 2 programs....hmmmm)

These applications should NOT be complicated, but simple and plenty of comments to help a new user. With our new Visual Designer this should be easy.

I started to to this with my PureDemo.Pb program available at: http://www.reelmediaproductions.com/pb/puredemo.zip

but it really needs to be included with PB or the PB web site so new users could find it.

--blueb
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
Originally posted by blueb

If everyone 'donated' 2 well documented applications to PureBasic's web site (let's see 2000 users X 2 programs....hmmmm)
Going from the number of members here there are probably only around 500 users. So unless Fred emailled everyone who was not here, you'd "only" get 1000 demo applications instead of 4000 :wink:
I started to to this with my PureDemo.Pb program available at: http://www.reelmediaproductions.com/pb/puredemo.zip

but it really needs to be included with PB or the PB web site so new users could find it.
It certainly needs to be made available somewhere, because it is not on the Resources site any more. And doesn't Paul get annoyed that people link directly to the files without ever having to see the site?


--
I used to be a nihilist but I don't believe in that any more.
(Win98first ed. + all updates, PB3.51, external editor)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ricardo.
Marketing is one, but that takes money (or a knockout demo game or app that really blows people away).
Yep, a knockout demo with the source could convince many downloaders.
So, what can be done to help put PB "on the map"?
The crucial question is: How many download per week does PB has now?

And how many of them purchase it?

If the rate is more than 1% then what PB needs is to get more downloads, if the rate is less than 0.5% then many downloaders are unistalling the application quickly.

The strategy must be directed to obtain BOTH objectives:

a) Get MORE downloads

b) Get a better rate of purchases

For a) the search engines are critical, maybe having 3 or 4 laaarge websites (every one in a different server and with different domains AND DIFFERENT CONTENT)plenty of good info and KEYWORDS could drive a lot of traffic and a lot of downloads.
Tables of comparition betewn Pure and VB, Blitz, etc.
A lot of code as html pages, and many many info, every command explained in a very very detailed way (every command must have its own page with no less than 200 words)... in resume: having a lot of pages search engine friendly.

It could be a ggod idea to make some apps in VB and in PB and put BOTH codes in web pages that let the user compare... all this kind of pages drive clicks because if someone type 'instr' per example and one of the examples has this VB command, the page could be founded with search engines. As many keywords related to VB are in the web pages as many traffic the site will get.

*Dont use PHP or ASP, etc. to build search engine friendly pages, static pages are loved by search engines!!

About b) many good ideas was given on the forums.




Best Regards

Ricardo

Dont cry for me Argentina...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Amiga5k.

Yes, yes! Head to head, feature for feature cross comparisons between the the 'top 3 or 4' (whoever they are, but we can guarantee that VB is by far the most popular - more people develop with it than Visual C++!). True, it would have to be 'tailored' a little bit to cast a better light on PB. That is, accentuating the positives and deminishing the negatives (what few there are :)).

You're probably not going to pull any people from the VB camp, but you may get some people to purchase PB in addition to VB for its' advantages (small total code size, speed). Hopefully, all these things (user guide, tons of examples and demos, exposure to many shareware sites, etc) will come into being within the next few months... .

Russell

***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by theogott.

Just repeating what RICARDO said, cause its perfectly what I think.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the downloaders could find a way to understand PureBasic faster, the orders will increase a lot.

Remember that usually a downloader test every application for 3 to 5 minutes, if they like it then they go deeper if not its uninstalled. PureBasic need to focus on the first experience of the downloader, open the Visual Designer and open a Tutorial with many snippets at start could make the difference.

http://www.purebasic.com still need a lot of more info, examples, etc, etc, etc. if you cant find the word 'visual basic' or 'basic' or 'compiler' (and many others) many times in the site, then its not search engine friendly.

*************************
The best time to do things is now !
Post Reply