05-08-2017, 08:41 AM
So I created a custom @HitTry code, it's pretty long, probably 200 lines of code, just a bunch of IF statements. The code works great. I have it set up so that if I have 200 dex, I swing weapons like a madman, like 5-10 hits per second.
Then I need to work on another part of @HitTry (my chance to hit regarding Tactics skill) and I put all my code for my swingspeed into a FUNCTION, and went ahead and tested it before I started coding anything more, and I found that instead of swinging like 5-10 times a second, I swing like 1 time a second.
So my question is about performance using functions, is there any reason that the exact same code being called from a FUNCTION would run slower that if it wasn't in function?
I would never have guessed it would, anyone have any ideas?
Thanks,
-Murmur
Then I need to work on another part of @HitTry (my chance to hit regarding Tactics skill) and I put all my code for my swingspeed into a FUNCTION, and went ahead and tested it before I started coding anything more, and I found that instead of swinging like 5-10 times a second, I swing like 1 time a second.
So my question is about performance using functions, is there any reason that the exact same code being called from a FUNCTION would run slower that if it wasn't in function?
I would never have guessed it would, anyone have any ideas?
Thanks,
-Murmur