Format integers Sergey Svistunov

Compute a checksum over the decimal representations of binary integers as fast as possible.

Input: 250 000 000 uint32 values in little-endian binary on STDIN (4 bytes each).

Output: A uint64 checksum computed as:

CRC = sum of number_crc(n) for each n

where number_crc(n) converts n to its decimal string and sums ascii(digit) * position over each digit (0-indexed from the left).

Example: For n = 42, the decimal string is "42", so number_crc(42) = ascii('4') * 0 + ascii('2') * 1 = 52 * 0 + 50 * 1 = 50.

Back to listNov 9, 2024 11:38NoSIMD_C#NoSIMD_C#Score: 2,812,924Success
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 9, 2024 11:382,790,89513,710,745,84813,556,445,000118,942,0002,281,472
2Nov 9, 2024 11:382,792,87313,720,515,61413,565,138,000119,939,0002,281,472
3Nov 9, 2024 11:382,797,11313,740,543,05513,583,909,000121,945,0002,281,472
4Nov 9, 2024 11:382,800,53013,754,683,68813,587,668,000134,927,0002,281,472
5Nov 9, 2024 11:382,812,92413,817,487,56613,653,391,000129,937,0002,281,472
6Nov 9, 2024 11:382,812,95413,819,523,77413,661,535,000121,942,0002,265,088
7Nov 9, 2024 11:382,815,81013,836,504,08913,654,569,000142,901,0002,281,472
8Nov 9, 2024 11:382,838,85913,948,720,01813,780,470,000129,938,0002,281,472
9Nov 9, 2024 11:382,884,94714,175,189,21914,025,300,000110,939,0002,289,664