Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Spell of Mastery Progress

Name: Anonymous 2020-09-17 20:05

Ok. The new voxel rendering algorithm performs 1.4 times faster. Not much, but voxel models can also be split into 16-bit chunks, which locally use only 16-bit addressing. That should speedup the algorithm further, if the bottleneck is with the memory bandwidth.

I've also discovered that GCC's __builtin_popcount is slower than a lookup table, since it branches into subroutine __popcountdi2. Why GCC doesnt use the x86 popcnt opcode? No idea. No idea. But it probably would be easier to answer why Stallman molests little children.

Name: Anonymous 2020-10-06 9:11

For a long time I have been using a hashtable library made by other people. It had its drawbacks. In particular I have to acknowledge the original authors in the credits of my software, and its hash function is far from being perfect.

For example, here is their hash Bernstein function applied to the various modifications of the string "hello":
0f8fff15: hallo
0f908b76: hbllo
0f9117d7: hcllo
0f91a438: hdllo
0f923099: hello
0f92bcfa: hfllo
0f93495b: hgllo
0f93d5bc: hhllo
0f94621d: hillo
0f94ee7e: hjllo
0f957adf: hkllo
0f960740: hlllo
0f9693a1: hmllo
0f972002: hnllo
0f97ac63: hollo
0f9838c4: hpllo
0f98c525: hqllo
0f995186: hrllo
0f99dde7: hsllo
0f9a6a48: htllo
0f9af6a9: hullo
0f9b830a: hvllo
0f9c0f6b: hwllo
0f9c9bcc: hxllo
0f9d27ee: hyll0
0f9d27ef: hyll1
0f9d27f0: hyll2
0f9d27f1: hyll3
0f9d27f2: hyll4
0f9d27f3: hyll5
0f9d27f4: hyll6
0f9d27f5: hyll7
0f9d27f6: hyll8
0f9d282d: hyllo


Obviously the hash code is patterned and these paterns depend heavily on the input string. That is important since in real life we almost always have a house addresses differing in just a single letter or program identifiers, like var1, var2, var3, so such hash wont work with real world data. There is also this Jenkins hash, it is far better and works with real life data, but a bit more expensive and still has patterns recognizable by naked eye without any statistical analyzis. So I have devised my own hash function based on several 8-bit tables. It can be further improved indefinitely by adding more tables:

0fda1cfa: hyll7
1864c82e: hallo
1c2e7fe6: hrllo
1f8f556c: hvllo
23cec7ba: hyll5
365c49df: hyll8
3d6fdff8: hyll2
3fdad270: hcllo
3ffccabb: hello
42ca52e2: hjllo
444f47fc: hpllo
4a5cab6a: hlllo
4a9c241a: hyllo
4e78b60f: hyll3
5542cce3: hbllo
63de5b4f: hullo
6caacdf2: hmllo
7047ee06: hnllo
7f93c530: hqllo
877d5a81: htllo
8929485e: hyll6
8a54f3f8: hfllo
8e648de0: hgllo
9b75886e: hhllo
a5c38ada: hyll1
afd5fcaf: hkllo
c0f0bed4: hyll0
c78518d7: hyll4
d31d4120: hwllo
da87f7c6: hsllo
ee53475f: hdllo
f7d37f32: hillo
fa17acf1: hxllo
fb77afab: hollo



So now I don't have to acknowledge anyone at all, and I can honestly state that I made everything myself. Fuck Communism!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List