Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Tip 2: Use The Heap As Little As Possible

Tip 2: Use The Heap As Little As Possible

I used to use the Heap a lot for counting my loops and such, but realised it was actually extremely inefficient; first pushing an address, getting the current count, taking/adding one, re-pushing address, etc.

Now I just push a value on the stack to act as loop counter, then use the [Space][LF][Tab] swap command to get back to it when I need it. It takes a lot of working in/around, but when you get it it can really reduce your char count.

#Tip 2: Use The Heap As Little As Possible

I used to use the Heap a lot for counting my loops and such, but realised it was actually extremely inefficient; first pushing an address, getting the current count, taking/adding one, re-pushing address, etc.

Now I just push a value on the stack to act as loop counter, then use the [Space][LF][Tab] swap command to get back to it when I need it. It takes a lot of working in/around, but when you get it it can really reduce your char count.

Tip 2: Use The Heap As Little As Possible

I used to use the Heap a lot for counting my loops and such, but realised it was actually extremely inefficient; first pushing an address, getting the current count, taking/adding one, re-pushing address, etc.

Now I just push a value on the stack to act as loop counter, then use the [Space][LF][Tab] swap command to get back to it when I need it. It takes a lot of working in/around, but when you get it it can really reduce your char count.

Source Link
user36219
user36219

#Tip 2: Use The Heap As Little As Possible

I used to use the Heap a lot for counting my loops and such, but realised it was actually extremely inefficient; first pushing an address, getting the current count, taking/adding one, re-pushing address, etc.

Now I just push a value on the stack to act as loop counter, then use the [Space][LF][Tab] swap command to get back to it when I need it. It takes a lot of working in/around, but when you get it it can really reduce your char count.

AltStyle によって変換されたページ (->オリジナル) /