Timeline for Sum of all integers from 1 to n
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
Jul 22, 2017 at 11:12 | history | edited | Cody Gray | CC BY-SA 3.0 |
added 509 characters in body
|
Jul 22, 2017 at 11:08 | comment | added | Cody Gray | Wow, I can't believe I missed the one-operand form! I should really know by now not to say things like "cannot be beat". When will I learn?! Thanks, @Peter. | |
Jul 22, 2017 at 8:45 | comment | added | Peter Cordes |
I wondered if add +loop would be shorter than imul while looking at the other answer. Handy that there's a standard calling convention that passes the first arg in ecx
|
|
Jul 22, 2017 at 8:42 | comment | added | Peter Cordes |
Actually, one-operand imul ecx or mul ecx would work and save a byte in the closed-form implementation. I didn't spot that right away; I was about to comment that it was optimal for both performance and code-size before realizing that an implicit eax operand was fine.
|
|
Jul 19, 2017 at 7:29 | history | edited | Cody Gray | CC BY-SA 3.0 |
added 20 characters in body
|
Jul 19, 2017 at 7:23 | history | answered | Cody Gray | CC BY-SA 3.0 |