It's written in Go, a language that compiles to native code
Parsing, printing, and source map generation are all fully parallelized
Everything is done in very few passes without expensive data transformations
Code is written with speed in mind, and tries to avoid unnecessary allocations
不過作者有提到這個專案畢竟比較新,還沒有被時間磨練過,可能會有些 bug:
This is a hobby project that I wrote over the 2019-2020 winter break. I believe that it's relatively complete and functional. However, it's brand new code and probably has a lot of bugs. It also hasn't yet been used in production by anyone. Use at your own risk.
This means my 2TB snapshot restore job that used to take an hour is now ready in about 5 minutes – and most of that time is spent provisioning a new RDS instance.
主要是得力於後端 storage 的部份可以實做 copy-on-write 架構:
By taking advantage of Aurora’s underlying distributed storage engine you’re able to quickly and cheaply create a copy-on-write clone of your database.
可以快速複製就可以很快的驗證一些事情,像是可以直接測試 ALTER TABLE 需要的時間,或是事前演練...
Based on benchmarks, Badger is at least 3.5x faster than RocksDB when doing random reads. For value sizes between 128B to 16KB, data loading is 0.86x - 14x faster compared to RocksDB, with Badger gaining significant ground as value size increases. On the flip side, Badger is currently slower for range key-value iteration, but that has a lot of room for optimization.
Looking at the source code, it doesn’t attempt to perform glob expansion itself. Instead it calls the C library implementation glob(3), which runs in linear time, at least on this Linux system. So maybe we should look at programming language implementations too.
再來是看各程式語言:
各家實做方式不一樣 XD
然後文章裡有提到這個方式是之前蠻常見的 DoS 技巧,用很少的資源就可以吃光你的 CPU resource... 另外也提到了可能的解法,就是限制星號的數量:
At the very least, most FTP servers should probably reject glob patterns with more than, say, 3 stars.
Alacritty is a blazing fast, GPU accelerated terminal emulator. It’s written in Rust and uses OpenGL for rendering to be the fastest terminal emulator available.
全螢幕全文字的情況下可以到 500 fps:
Alacritty’s renderer is capable of doing ~500 FPS with a large screen full of text. This is made possible by efficient OpenGL usage.
Doing 160 bit ecdh's for 10s: 40865 160-bit ECDH ops in 9.99s
Doing 192 bit ecdh's for 10s: 34169 192-bit ECDH ops in 9.99s
Doing 224 bit ecdh's for 10s: 60980 224-bit ECDH ops in 9.99s
Doing 256 bit ecdh's for 10s: 34298 256-bit ECDH ops in 10.00s
Doing 384 bit ecdh's for 10s: 9602 384-bit ECDH ops in 10.00s
Doing 521 bit ecdh's for 10s: 9127 521-bit ECDH ops in 9.99s
We present a 64-bit optimized implementation of the NIST and SECG-standardized elliptic curve P-224.
而實際成果:
full TLS handshakes using a 1024-bit RSA certificate and ephemeral Elliptic Curve Diffie-Hellman key exchange over P-224 now run at twice the speed of standard OpenSSL, while atomic elliptic curve operations are up to 4 times faster.
Add optional 64-bit optimized implementations of elliptic curves NIST-P224, NIST-P256, NIST-P521, with constant-time single point multiplication on typical inputs.