Hacker Times
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ActivePattern
on Jan 3, 2025
|
parent
|
context
|
favorite
| on:
Can LLMs write better code if you keep asking them...
Doing a single modulo 9 operation is much faster than summing a d-digit number, which requires d modulo 10s, d divide 10s, and d sums.
brabel
on Jan 4, 2025
[–]
You can do the sum by looking directly at the digits in the string, no need for module at all.
Jensson
on Jan 4, 2025
|
parent
[–]
Number to string is even more expensive.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: