Topic List | Page List: 1 |
---|---|
Topic | Isn't this the fastest way to do a for loop |
Yellow 02/07/20 1:52:21 AM #1: | I never, never see this done this way, but it seems like the fastest way to do a for loop. Instead of for (int i = 0; i < something; i++) { ... } for (int i = 0; i++ < something;) { ... } I heard adding ++ to the end of an integer while reading basically has no performance loss. Doing it this way basically removes an opcode from every loop, right? I know for loops produce less garbage than foreach. --- ... Copied to Clipboard! |
Topic List | Page List: 1 |