333 private links
CRAM is offering near-native DRAM speeds.
Compared to Zswap or ZRAM.
From one minutes to 400ms
It shows how using RAM efficiently can increase performance.
- Stop allocating useless strings: to_string(), .clone(), HashMap borrow the string
- Optimize
hashmaplookups withhashmap.entry().or_insert(0) += 1instead of 3 lookups: in an if condition, insert operation and update. - Use as much core as possible: rewrite loops as iterators and then use rayon with
par_lines. remove()in array is a costly O(n) operation. If order is not important, preferswap_remove.
From 2-10 nanoseconds to 700 picoseconds to format a number.
And here is the problem: the encryption performs 2 passes over the data: first to encrypt, then to compute the authentication tag.
As we've seen before, it's bad because you will pay huge penalties when loading / unloading your data to / from memory to / from SIMD registers multiple times, even if you AES-CTR and GHash implementation are optimized to the mooooon.
It reduces the noise of the input and the AI consumes 90% less tokens. These tokens are less noise for the AI to compute.
Source: https://github.com/chopratejas/headroom
The documentation: https://headroom-docs.vercel.app/docs
As always serving raw HTML and CSS for the win. In comparison to NextJS, Astro delivered the same features for 5% of the original bundle size.
A Finite State Transducer seems to be the best algorithm instead of a full index search.
The data don't need to be stored in a database indeed. They only need to be searched as text.
The bun single binary performs better!
64-bits pointer address can be compressed to 32 bits
Passer les PNG/JPEG qualité 90 à AVIF qualité 50 permet d'économiser au moins 75% de bande passante.
L'idée plus innovante est de compresser au préalable les ressources avant qu'elles soient utilisées.
[Précompresser avant de déployer] veut dire qu’on peut les compresser une seule fois, avec le niveau maximum, et demander à nginx de servir directement les fichiers pré-compressés. Zéro CPU à chaque requête, mais surtout un meilleur ratio au final, car on peut compresser plus fort.
En outre, Zopfli permet de compresser en .zip avec 3 à 8% d'efficacité en plus.
# Serve pre-compressed files generated at build time
gzip_static on;
brotli_static on; # nécessite libnginx-mod-http-brotli-static
# Fallback pour les contenus non pré-compressés
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript
application/javascript application/json
application/xml image/svg+xml;
La compression Brotli permet de compresser à hauteur de 81% le HTML. La score des Web Core Vitals est passé de 70-85 à 99%.