It is currently Sun May 27, 2018 8:35 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 2D to 3D scanner converter software
PostPosted: Thu Nov 23, 2017 4:30 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 509
Location: Belgium
hello,

< COPY OF MY POST HERE >
http://www.purebasic.fr/english/viewtopic.php?f=36&t=64446


For my 2D to 3D image converter, (cancer research)
I convert 2D bmp images to a 3D pixels cloud.
To do that I use a self made algorithm, written in PB.
It work very well but it need about 3...4 minutes to do the conversion. (see below)
So, will there be a significant difference in time when I rewrite my program in ASM ?
thanks,

marco


Image

Sorry, I do not use ogre for this one,
I just convert data to build a 2D image, who gives a 3D impression...

_________________
Greetings from Pajottenland - Belgium
PS: sorry for my english I speak flemish ...
www.marc-systems.be


Top
 Profile  
Reply with quote  
 Post subject: Re: 2D to 3D scanner converter software
PostPosted: Thu Nov 30, 2017 9:18 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 1495
marc_256 wrote:
will there be a significant difference in time when I rewrite my program in ASM ?

Yes, rewriting to asm takes a lot of time. :mrgreen:

More seriously, your question is like asking how long is a piece of string. It really boils down to how well your code is written, and what it does. If you have great code, converting to asm will only give you a 2x or maybe 4x speed boost. There are some things that pb is very slow at, such as strings, but the libraries are compiled in C by Fred, and simple math type calculations will not be much slower than C. If you are passing a lot of data through function calls, make sure you are using pointers if possible rather than lots of parameters.

What I recommend is you run your program using the resource monitor; it is a powerful tool. You can see which functions are called the most often, then optimize those. I think you can also see how much time is spent in a function. It's been a while since I have used it, but when I needed it, it was awesome.

This is based on the assumption that you aren't wanting to share code for us to critique, since you did not already post it.


Top
 Profile  
Reply with quote  
 Post subject: Re: 2D to 3D scanner converter software
PostPosted: Tue Jan 23, 2018 5:02 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1243
Without knowing how the algorithm works it's hard to answer.
However knowing you did it in PureBasic the answer is probably yes it will run faster. How much is impossible to answer before we know more about your algorithm. Most importantly: Can it be parallelized to take advantage of the SIMD unit of the CPU. If yes, we could see performance improvements of 10x and more.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye