annotate README @ 3:6483683ac857 default tip

*: add profiling code too; expand x86 to use all eight XMM registers basically ported verbatim from the assembly
author Paper <paper@tflc.us>
date Mon, 09 Feb 2026 21:30:30 -0500
parents ead9f84d11db
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
1 This code was mostly written as an experiment, to see just how much
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
2 could be done using only the C preprocessor (give or take). Turns out
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
3 you can do quite a lot.
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
4
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
5 In fact, *all* of the tables in this library are generated at compile-time.
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
6 The polynomial is #define'd in crc32i.h, and all of the tables are generated
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
7 through a combination of enums and preprocessor trickery. Note that this
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
8 may cause this code to compile slowly on some machines or compilers.
422835bc1aca *: checkin
Paper <paper@tflc.us>
parents:
diff changeset
9
2
ead9f84d11db *: make it work on non-x86 too
Paper <paper@tflc.us>
parents: 1
diff changeset
10 At the moment it is hardcoded for gcc, but it could be adapted to other
ead9f84d11db *: make it work on non-x86 too
Paper <paper@tflc.us>
parents: 1
diff changeset
11 compilers if they also have features like e.g. alignas() or whatever.
ead9f84d11db *: make it work on non-x86 too
Paper <paper@tflc.us>
parents: 1
diff changeset
12 The code relies on C99 stdint.h but if that's not available you can just
ead9f84d11db *: make it work on non-x86 too
Paper <paper@tflc.us>
parents: 1
diff changeset
13 typedef to the suitable C89 types on your system.
ead9f84d11db *: make it work on non-x86 too
Paper <paper@tflc.us>
parents: 1
diff changeset
14
ead9f84d11db *: make it work on non-x86 too
Paper <paper@tflc.us>
parents: 1
diff changeset
15 --paper <paper@tflc.us>