[Gambas-user] Testing scripter, but found this script to be slow

Brian G brian at westwoodsvcs.com
Mon Jan 11 01:37:16 CET 2021


I tried moving everything inside the L > 0 that I could and it did not make much difference, the time must somehow be in the for look construct.. 
Interesting ! maybe I will try a while loop instead. 

Thank You 
Brian G 


From: "Jussi Lahtinen" <jussi.lahtinen at gmail.com> 
To: "Gambas mailing list" <user at lists.gambas-basic.org> 
Sent: Sunday, January 10, 2021 3:00:55 PM 
Subject: Re: [Gambas-user] Testing scripter, but found this script to be slow 

Yes, it does a lot of work per character. The spacing doesn't make a difference unless you use a large terminal. But I understand, it's not a satisfying solution. 
However, almost nothing is needed to be calculated before luminance. So the code is in wrong order. Now everything is calculated whether L>0 or not. 
JIT just is very fast. 


Jussi 


On Mon, Jan 11, 2021 at 12:50 AM Brian G < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > wrote: 



Dont undestand what you mean by 
4x theta and phi spacings, and you should have almost four times better performance. 

do you mean increase the spacing by 4, then yes that would make it do less work. 

But I am really wondering what gambas is doing that makes it so much slower without the fast. 
when mostly its is math. 131,xxx iterations per image depending of screen size. 

Maybe it was a silly question, oh well. 

Thank You 
Brian G 


From: "Jussi Lahtinen" < [ mailto:jussi.lahtinen at gmail.com | jussi.lahtinen at gmail.com ] > 
To: "Gambas mailing list" < [ mailto:user at lists.gambas-basic.org | user at lists.gambas-basic.org ] > 
Sent: Sunday, January 10, 2021 2:16:56 PM 
Subject: Re: [Gambas-user] Testing scripter, but found this script to be slow 

At least the "unsafe" should be unnecessary for good performance. Look at what the profiler says. 
To me it looks like you are doing a lot of unnecessary operations. 4x theta and phi spacings, and you should have almost four times better performance. 


Jussi 

On Sun, Jan 10, 2021 at 10:36 PM Brian G < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > wrote: 

BQ_BEGIN

I have been testing scripter, using the attached script. 

This does not have anything to do with the actual testing 

But if i remove the fast unsafe the program barely runs. I was wondering if anyone cold tell me why? 

It is really amazing to me the difference. 

Thank You 
Brian G 

----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- 





----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- 

----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- 

BQ_END



----[ http://gambaswiki.org/wiki/doc/netiquette ]---- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210110/63621266/attachment.htm>


More information about the User mailing list