Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Passing and/or returning an array to/from a function is 1000 times slower than using a global

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Oct 2018 03:11 Edited at: 23rd Oct 2018 03:19
Just ran into this and thought it might be helpful to pass it on.

This makes sense really because i think it would be copying the entire array on an off the stack.

MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 23rd Oct 2018 05:01 Edited at: 23rd Oct 2018 05:01
And the same function with pass as reference.

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Login to post a reply

Server time is: 2024-03-28 20:17:08
Your offset time is: 2024-03-28 20:17:08