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 listDec 13, 2024 07:57NoSIMD_C#NoSIMD_C#Score: 671,574Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Dec 4, 2024 11:59671,4783,319,936,1883,288,242,0001,998,0002,273,280
2Dec 4, 2024 11:59671,5203,317,203,6933,289,450,000999,0002,273,280
3Dec 13, 2024 07:57671,5353,322,379,4483,289,523,000999,0002,531,328
4Dec 4, 2024 11:59671,5403,323,156,8443,289,547,000999,0002,273,280
5Dec 4, 2024 11:59671,5663,323,500,8973,286,675,0003,997,0002,273,280
6Dec 4, 2024 11:59671,5713,317,586,6623,287,703,0002,997,0002,273,280
7Dec 4, 2024 11:59671,5743,321,798,7653,289,714,000999,0002,273,280
8Dec 4, 2024 11:59671,5883,323,836,1343,288,782,0001,998,0002,273,280
9Dec 4, 2024 11:59671,5953,319,972,3373,288,819,0001,998,0002,265,088
10Dec 13, 2024 07:57671,6033,319,995,7153,287,857,0002,998,0002,273,280
11Dec 4, 2024 11:59671,6653,319,823,9773,289,161,0001,998,0002,265,088
12Dec 13, 2024 07:57671,6893,322,009,0043,287,280,0003,997,0002,527,232