[Gambas-user] Getting Gambas up to speed.

Joseph Murphy njmurphy1 at ...734...
Sat Jul 9 21:29:05 CEST 2005


Hi Michael

 I have an idea that might help some for the speed of the calculations.  If 
you make a terminal app that only does the calculations for an object.  
When you instantiate an object start the terminal app for that object with 
the shell or exec command.  This will have it's own instance of gbx so the 
calculation should/hopefully be faster.  You can then read and write to 
these processes to get the data for that object.  I know you mentioned an 
aversion to C in your first post but if all you need is some number 
crunching writing a small program in C might be the thing to do.  Then you 
can start it with exec or shell and read and write to it.  

 With this idea you are using a process instead of a thread.  The process 
has more overhead but I think in this case that's a good thing because it 
will have it's own gbx so there are multiple instances of gbx doing work 
for you.  Also if you off loaded the heavy lifting to a C programs gambas 
can be used to do the screen updating.  This should speed up things nicely.

 I haven't tested any of this.  It's just an idea off the top of my head so 
it could all be hog wash but maybe not.  If you test this out please post 
your results to the list.  I am contemplating writing a game for my kids 
and this could be useful for me also.

Joseph

Famous quote from Andy Grove former CEO of Intel:
"I live in fear that some day Microsoft will write efficient code and we 
won't need faster processors." 





More information about the User mailing list