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 16:25NoSIMD_C#NoSIMD_C#Score: 1,300,536Success
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 16:251,300,1656,404,714,7316,262,863,000107,945,0002,539,520
2Nov 15, 2024 16:251,300,2966,406,741,0486,259,511,000111,937,0002,539,520
3Nov 15, 2024 16:251,300,3176,406,197,0676,255,617,000115,937,0002,531,328
4Nov 15, 2024 16:251,300,4016,407,537,2916,256,055,000115,908,0002,297,856
5Nov 15, 2024 16:251,300,5366,403,878,8836,264,701,000107,925,0002,539,520
6Nov 15, 2024 16:251,300,5536,402,922,6286,255,769,000116,939,0002,535,424
7Nov 15, 2024 16:251,300,6186,405,624,6906,259,099,000113,928,0002,293,760
8Nov 15, 2024 16:251,300,7626,404,509,6986,254,815,000118,920,0002,301,952
9Nov 15, 2024 16:251,300,9696,406,370,1056,260,809,000113,941,0002,297,856