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 13, 2024 17:29NoSIMD_C#NoSIMD_C#Score: 1,330,927Success
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Nov 13, 2024 17:291,329,9116,550,184,3946,353,724,000162,839,0002,297,856
2Nov 13, 2024 17:291,330,3486,556,429,9226,377,885,000140,820,0002,338,816
3Nov 13, 2024 17:291,330,8306,553,526,3596,349,249,000171,817,0002,514,944
4Nov 13, 2024 17:291,330,9246,554,575,6956,372,676,000148,852,0002,342,912
5Nov 13, 2024 17:291,330,9276,557,210,7786,354,710,000166,834,0002,301,952
6Nov 13, 2024 17:291,331,5976,559,575,1596,358,033,000166,791,0002,375,680
7Nov 13, 2024 17:291,331,8536,562,452,1226,370,245,000155,834,0002,289,664
8Nov 13, 2024 17:291,332,4806,566,504,9766,380,309,000148,843,0002,306,048
9Nov 13, 2024 17:291,342,8736,616,358,4086,401,267,000178,811,0002,318,336