318 private links
It's absolutely possible to beat even the best sort implementations with domain specific knowledge, careful benchmarking and an understanding of CPU micro-architectures. At the same time, assumptions will become invalid, mistakes can creep in silently and good sort implementations can be surprisingly fast even without prior domain knowledge. If you have access to a high-quality sort implementation, think twice about replacing it with something home-grown.
Optimizing some endpoints in Rust inside a go app.
The results shows nearly 2x performance.
Modular CSS or a bundles? It follows Rethinking modular CSS and build-free design systems.
On first load, modular css files are worse.
Once the files are cached, subsequent renders take just 100ms to 200ms slower with modular files compared to one bundled file.
Given that the guiding ethos of Kelp is that the web is for everyone, it looks like I should probably be encouraging folks to use a bundled version as the main entry point.
tl;dr: the issue isn’t the @import rule itself, but that files under 1kb often end up the same size or even bigger when gzipped, so you get no compression benefits.
The experience shows that atomic css files is not optimal.
If the files I was importing were larger, it might make sense. As tiny, modular files? Not so much!
The complete library concatenated and gzipped is less than a single HTTP request. It’s just over 25-percent of the transfer size of sending modular gzipped files instead.
The naive Rust implémentation is 10 times faster than the python one.
It remains 6 times faster than the optimized one.
The Python has a collections.Counter class that is approximately as fast as the naive Rust version.
Finalement laisser son périphérique branché avec la batterie tout le temps à 100%, c'est comme prendre une grande bouffée d'air et retenir sa respiration. C'est pas bon.
Est-ce que laisser sa batterie à 20-80% est toujours une bonne idée, puisque les BMS intègrent une logique dédiée.
Replace the standard DefaultHasher
to ahash::{AHashMap, AHashSet}
to gain 18% improvements.
Only transfer the useful part of a font. It subsets static Unicode-ranges, so only a part of the font will be downloaded.
Dump the database as SQL statements instead of copying it with indexes. Then compress the resulting txt file.
# Create the backup
sqlite3 my_db.sqlite .dump | gzip -c > my_db.sqlite.txt.gz
# Reconstruct the database from the text file
cat my_local_database.db.txt | sqlite3 my_local_database.db
As complete script example:
# Create a gzip-compressed text file on the server
ssh username@server "sqlite3 my_remote_database.db .dump | gzip -c > my_remote_database.db.txt.gz"
# Copy the gzip-compressed text file to my local machine
rsync --progress username@server:my_remote_database.db.txt.gz my_local_database.db.txt.gz
# Remove the gzip-compressed text file from my server
ssh username@server "rm my_remote_database.db.txt.gz"
# Uncompress the text file
gunzip my_local_database.db.txt.gz
# Reconstruct the database from the text file
cat my_local_database.db.txt | sqlite3 my_local_database.db
# Remove the local text file
rm my_local_database.db.txt
There should be better ways though.
Option has zero cost with Some types in memory.
This is huge:
Cores may stay idle for seconds while ready threads are waiting in runqueues. In our experiments, these performance bugs caused many-fold performance degradation for synchronization-heavy scientific applications, 13% higher latency for kernel make, and a 14-23% decrease in TPC-H throughput for a widely used commercial database.
DOI: https://dl.acm.org/doi/10.1145/2901318.2901326
It may be useful to read it completely.
Fixes:
- compare the minimum load of each scheduling groups instead of the average
- Linux spawns threads on the same core as their parent thread: a node can steal threads from a another node by comparing the average load
and two others
It is useful to read their tools (online sanity checker for invariants such as "No core remains idle while another core is overloaded")
During the 00s,dozens of papers described new schedling algorithms, [... but] a few of them were adopted in mainstream operatin systems, mainly because it is not clear how to integrate all theseideas in scheduler safely.
Similar the part Related Work describes the current state of the research on other domains: performance bugs, kernel correctness, tracing.
The resources are available on Github: https://github.com/jplozi/wastedcores
We can expect a x8 speedup for a big transaction.
Optimization is not always a progress in every field
Similar to https://shaarli.lyokolux.space/shaare/xwiTHQ
Bit operators are the fastest, then static array, then dynamic arrays.
Objects are heavy in comparison.
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA busy_timeout = 5000;
PRAGMA cache_size = -20000;
PRAGMA foreign_keys = ON;
PRAGMA auto_vacuum = INCREMENTAL;
PRAGMA temp_store = MEMORY;
PRAGMA mmap_size = 2147483648;
PRAGMA page_size = 8192;