Android NDK 宣佈向 Clang 靠攏...
在 Hacker News Daily 上看到 Android NDK 宣佈向 Clang 靠過去的消息:「Changelog for NDK Build 2490520」。 Android NDK 做為效能的加速手段而使用到 C 或是 C++,所以會使用對應的 compiler suite: The NDK is a toolset that allows you to implement...
View ArticleWebkit 推出 B3 JIT Compiler (Bare Bones Backend)
Webkit 推出了 B3 加快 optimization 的速度,取代原來 LLVM 的工作:「Introducing the B3 JIT Compiler」。 在文章後方 Performance Results 的部份可以看到最主要的差異在啟動時間: 另外也可以看到其他各種 performance benchmark 也幾乎都是小勝 LLVM。 接下來會有 ARM64 與其他平台的計畫:...
View ArticleGCC 的警告參數
在「Useful GCC warning options not enabled by -Wall -Wextra」這邊提到 GCC 如果把這些參數放入 -Wall 與 -Wextra 裡會產生出太多的誤判,但有些參數還是很有用。 不過這邊介紹的參數蠻多都需要 GCC 6+ 甚至 GCC 7+,翻了 Ubuntu 16.04 是 GCC 5.4。 這是文章介紹的參數的整理:...
View Article讀書時間:Spectre 的攻擊方式
上次寫了 Meltdown 攻擊的讀書心得 (參考「讀書時間:Meltdown 的攻擊方式」),結果後來中獎狂流鼻水,加上 Spectre 用的手法就更複雜,慢慢看的情況就拖到最近才看完... 這邊就以讀者看過 Meltdown 那篇心得的前提來描述 Spectre。 Spectre 的精華在於 CPU 支援 branch prediction 與 out-of-order...
View ArticleWindows 上的 Chrome 改用 Clang 編譯
這應該是上個禮拜蠻熱鬧的一件事情 (i.e. 很多人看熱鬧 XD),就是 Google Chrome 從 Visual C++ 改成用 Clang 編譯:「Clang is now used to build Chrome for Windows」。 文章裡推敲效能應該不是主要的因素,因為在不同項目測試下各有千秋,而且差距都不大: We conducted extensive A/B...
View ArticleYJIT 帶給 Ruby 大量的效能提昇
在 Hacker News 首頁上看到的消息,由 Shopify 贊助的 YJIT 被 Ruby 官方接受了:「Merge YJIT: an in-process JIT compiler (github.com/ruby)」。 YJIT currently provides average speedups of 23% over the CRuby interpreter on...
View ArticleFork 自微軟的 Pyjion 專案的 Python 3.10 + JIT 方案
在 Hacker News 上看到「Pyjion – A Python JIT Compiler (trypyjion.com)」這個專案,也是一個想要透過 JIT 加速 Python 的專案: Pyjion is a drop-in JIT Compiler for Python 3.10. It can be pip installed into a CPython 3.10...
View ArticleLLVM 的更換授權進展
在 Hacker News Daily 上看到「LLVM relicensing update & call for help」這篇,在講 LLVM 計畫從 UIUC license 與 MIT license 授權轉成 Apache License 2.0 的進展,在 Hacker News 上的討論「LLVM relicensing update and call for help...
View Article用 objdump 學到的一些東西...
在 Hacker News 首頁上看到「Hand-optimizing the TCC code generator (briancallahan.net)」這則,原始文章在「Hand-optimizing the TCC code generator」這邊。 主要是在文章內看到 objdump 這個東西,作者用這兩個指令看組語: tcc -c true.c objdump -d true.o...
View Article從簡單的 C 語言函式來看現代 Compiler 使用 SIMD 的威力
兩個禮拜前在 Hacker News Daily 上看到這篇很精彩的問題與分析,裡面展現出了現代 compiler 最佳化的能力,大量使用了 SIMD 來衝效能:「Why does this code execute more slowly after strength-reducing multiplications? (stackoverflow.com)」,原文在 Stack Overflow...
View Article