Raised This Month: $ Target: $400
 0% 

Is this execution correct?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
damage220
Senior Member
Join Date: Jul 2022
Location: Ukraine
Old 07-21-2022 , 09:07   Re: Is this execution correct?
Reply With Quote #2

What do you mean by correct? It depends. Just compile and run it.
1. You should never use sizeof( in a loop condition. Create a variable and store the size in it.
2. To speed up execution, move non-dynamic arrays out to global scope (precache), make them constant.
3. Try to avoid magic numbers, use constants instead.

Last edited by damage220; 07-22-2022 at 14:59.
damage220 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode