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 15, 2024 17:17NoSIMD_C#NoSIMD_C#Score: 1,244,325Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 15, 2024 17:171,243,7756,129,849,7595,982,580,000111,917,0002,293,760
2Nov 15, 2024 17:171,244,0166,127,312,6145,992,737,000102,943,0002,539,520
3Nov 15, 2024 17:171,244,2566,124,086,8705,983,915,000112,941,0002,293,760
4Nov 15, 2024 17:171,244,2576,125,939,3915,996,910,00099,948,0002,293,760
5Nov 15, 2024 17:171,244,3256,133,769,6255,949,261,000147,931,0002,293,760
6Nov 15, 2024 17:171,244,4546,131,175,6035,987,884,000109,942,0002,539,520
7Nov 15, 2024 17:171,244,7456,131,823,5745,978,326,000120,925,0002,547,712
8Nov 15, 2024 17:171,244,8106,128,004,5425,949,676,000149,891,0002,539,520
9Nov 15, 2024 17:171,254,4256,176,770,4156,042,755,000103,926,0002,547,712