3 ms·
This is so stupid, I love it! Its actually a great demonstration of efficient parallel processing on something totally not needing it. But you've got your "pre
by dragontamer 5y ago
This is so stupid, I love it!
Its actually a great demonstration of efficient parallel processing on something totally not needing it. But you've got your "prefix-sum" pattern (maybe called reduction-pattern in some other code, or even "scan" in yet other code).
The only problem is that there's only 16-digits, so parallel processing of this is barely an upgrade at all. But you can imagine that if we scaled credit-card numbers up to 1024 digits or 1-million digits (1 MB), this algorithm would scale very well.