🎉 BREAKING NEWS: Someone reinvented the wheel... again! 🎉 Meet #Chorba, the "novel" #CRC32 implementation that nobody asked for. 🤦‍♂️ Because what the world truly needs is yet another way to hash data. Bonus points for the riveting "Skip to main content" intro. 😂
https://arxiv.org/abs/2412.16398 #reinventingthewheel #hashingdata #techhumor #HackerNews #HackerNews #ngated
Chorba: A novel CRC32 implementation

This paper describes a novel method for efficiently calculating CRC checksums without lookup tables or hardware support for polynomial multiplication. Throughput of CRC32 is increased by 100% across different platforms compared with the current state of the art. Performance is on par with or exceeds hardware-accelerated solutions on x86_64 and ARMv8 processors, and these hardware-accelerated solutions see a performance increase of 5-20% depending on message length. The small number of operations required with this approach could simplify hardware CRC32 implementations.

arXiv.org
Chorba: A novel CRC32 implementation

This paper describes a novel method for efficiently calculating CRC checksums without lookup tables or hardware support for polynomial multiplication. Throughput of CRC32 is increased by 100% across different platforms compared with the current state of the art. Performance is on par with or exceeds hardware-accelerated solutions on x86_64 and ARMv8 processors, and these hardware-accelerated solutions see a performance increase of 5-20% depending on message length. The small number of operations required with this approach could simplify hardware CRC32 implementations.

arXiv.org

Emu68 v1.1: Más novedades

El desarrollador Michal Schulz continúa detallando las novedades de Emu68 v1.1, centradas esta vez en la gestión de la caché y en un nuevo mecanismo llamado Dumpster, diseñado para mejorar de forma notable el rendimiento en escenarios donde las frecuentes limpiezas de caché penalizaban la velocidad.

En versiones anteriores, cada vez que AmigaOS ejecutaba un LoadSeg —acción habitual en cada arranque del sistema o al cargar nuevos programas—, la caché de instrucciones se vaciaba y Emu68 se veía obligado a recompilar los bloques JIT desde cero. Aunque en el uso normal este impacto era asumible, el problema se agravaba con la emulación de MacOS mediante ShapeShifter o Fusion, ya que este sistema operativo fuerza decenas de limpiezas por segundo. El resultado: lentitud generalizada y una experiencia inferior incluso a la de aceleradoras clásicas 68040 o 68060.

Schulz observó que, en la mayoría de los casos, la memoria no cambia tras un vaciado de caché. De ahí surgió la idea de no descartar los bloques compilados, sino almacenarlos temporalmente en un “contenedor” (Dumpster) junto con un checksum CRC32 de la zona de memoria asociada. Si el contenido permanece inalterado, el bloque puede reutilizarse sin necesidad de recompilación, recuperándose en apenas microsegundos.

La primera aproximación utilizaba una segunda tabla hash, pero implicaba recortes en el tamaño de la caché y mayores colisiones, lo que reducía la velocidad en otros contextos. Finalmente, la solución definitiva llegó con la introducción del concepto de Epoch: un contador global que marca la validez temporal de los bloques JIT.

  • Cuando se vacía la caché, basta con incrementar el valor de Epoch.
  • Cada bloque JIT conserva un número de Epoch asociado.
  • Si su checksum es válido y el Epoch coincide con el actual, puede reutilizarse de inmediato.
  • El uso combinado del hash table y la caché LRU garantiza búsquedas más rápidas y eficientes.

Este sistema evita movimientos de datos innecesarios, mantiene la tabla hash en su tamaño completo y reduce drásticamente la pérdida de rendimiento en situaciones críticas como la emulación de MacOS.

Con estas mejoras, AmigaOS y MacOS arrancan de forma significativamente más rápida y la utilización de la caché JIT es mucho más eficiente. Además, el nuevo enfoque libera un núcleo extra de la Raspberry Pi para futuros proyectos, como la posible emulación de PowerPC dentro del mismo entorno.

Aunque el Dumpster todavía está en fase de refinamiento, las pruebas iniciales no muestran efectos adversos y confirman un avance importante en la experiencia de usuario con Emu68. De hecho, MacOS 7.5 ya puede iniciarse en apenas unos segundos, un hito impensable en versiones previas.

https://www.youtube.com/watch?v=JNZGNLweUyQ

#amigaos #arranqueRápido #caché #CRC32 #Dumpster #Emu68V11 #emulación #Epoch #Fusion #hashTable #jit #LoadSeg #LRUCache #macos #MichalSchulz #powerpc #raspberryPi #recompilación #rendimiento #ShapeShifter

Für die meisten wahrscheinlich ein Fall von „Wo steht der Bus?", aber wer weiß, wofür es vielleicht gut ist, wenn ich dieses Aha-Erlebnis nicht für mich behalte:

CRC32 in MySQL/MariaDB:

SELECT HEX(CRC32("Test")); → 784DD132

Wer in PHP gerne zum gleichen Ergebnis kommen möchte, sollte dort anstatt crc32

echo hash('crc32', 'Test'); → 5d8962d9 crc32b verwenden:
echo hash('crc32b', 'Test'); → 784dd132

#CRC32 #PHP #MariaDB #MySQL

@ariadne

The question then becomes whether that spec was written in the 21st century. (-:

#CRC32

@ariadne

The other somewhat more saddening thing is that the idea that a 32-bit cyclic redundancy check value is a good *hashing* value still lingers; 3 decades since the world gradually learned that it wasn't.

#CRC32 #ifupdown

@ariadne

The interesting part of that to me, that is unrelated to recent events, is how they *seem* to be reinventing ISC-licenced implementations of CRC32 in 2024. I am certain that such things have existed in the BSDs for decades.

There are probably fully (U.S.) public domain implementations of #CRC32 from the 1990s if one is willing to dig around in the world of old shareware. It was the sort of thing that got posted to magazines or passed around as code snippets in BBSes.

#ifupdown

xxHash: Seems to have one the contest for a non-cryptographic hash or checksum algorithm
https://xxhash.com/
#programming #checksum #md5sum #crc32 #hash #crc #+
xxHash - Extremely fast non-cryptographic hash algorithm

For a project at work I was torturing my brain if I could find some monoidal definition of CRC32 checksums to calculate them in an incremental way... Then noticed, as it is often the case, @kmett already did that :) https://www.schoolofhaskell.com/user/edwardk/parallel-crc #haskell #fp #crc32
Parallel and Incremental CRCs - School of Haskell | School of Haskell

We have improved our https://convert.ehehdada.com/ #online #data #converter to include the encoders and decoders for #base64, and #URL format; hashes for #MD2 #MD4 #MD5 #SHA1 #SHA2 #SHA3 #Gost #GostCrypto #SNEFRU; #checksum #algorithms for #Adler32 #CRC32 #CRC32b #FNV; text to binary, to octal, to decimal, to hexadecimal and vice versa; utilities like shuffle characters, to lowercase, to UPPERCASE; more soon. Let us know how you like it :-)
Convert data

Collection of operations and algorithms for converting data