Quantcast
Channel: compiler – Gea-Suan Lin's BLOG
Browsing all 14 articles
Browse latest View live

clang 的進展…

在 OSnews 上看到 clang 2.8 與其他幾個 compiler 的比較:「Compiler Benchmarks of GCC, LLVM-GCC, DragonEgg, Clang」。 以測試結果來說,如果改用 Clang,有些會變得比較快,但也有些變得比較差。不過以 license 以及後勁來看,還蠻看好發展的。六月的時候在 FreeBSD 的 -HEAD 裡面變成 default...

View Article



FreeBSD 預設的 compiler 從 GCC 換成 clang

FreeBSD 預設的 compiler (/usr/bin/cc、/usr/bin/c++ 與 /usr/bin/cpp) 從 GCC 4.2.1 換成 clang 了:「Revision 242624」。 目前只有 CURRENT 裡的 amd64 與 i386 版本換過去,如此一來,FreeBSD 10.0 會是第一個使用 clang 作為預設編輯器的正式版本 (看起來不像會 back...

View Article

Go 的 self-boot 計畫

Go 的 self-boot 計畫,也就是用 Go compiler 編 Go compiler:「Russ Cox – porting the Go compiler from C to Go」。 其中提到: The goal is to convert *their* C code (not all C code). They want generated code to be...

View Article

用統計方法反推 JavaScript 壓縮程式的變數名稱

JavaScript 在正式提供服務時一般都會使用「YUI Compressor」、「UglifyJS」或是「Closure Compiler」壓縮後再拿到正式環境上使用,最主要的目的是為了降低網路傳輸量。 這些工具其中一個特點是,local function 與 local variable 會被較短的名字取代掉,這可以讓想要反組譯的人比較麻煩。...

View Article

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 Article


Image may be NSFW.
Clik here to view.

Webkit 推出 B3 JIT Compiler (Bare Bones Backend)

Webkit 推出了 B3 加快 optimization 的速度,取代原來 LLVM 的工作:「Introducing the B3 JIT Compiler」。 在文章後方 Performance Results 的部份可以看到最主要的差異在啟動時間: 另外也可以看到其他各種 performance benchmark 也幾乎都是小勝 LLVM。 接下來會有 ARM64 與其他平台的計畫:...

View Article

GCC 的警告參數

在「Useful GCC warning options not enabled by -Wall -Wextra」這邊提到 GCC 如果把這些參數放入 -Wall 與 -Wextra 裡會產生出太多的誤判,但有些參數還是很有用。 不過這邊介紹的參數蠻多都需要 GCC 6+ 甚至 GCC 7+,翻了 Ubuntu 16.04 是 GCC 5.4。 這是文章介紹的參數的整理:...

View Article

Image may be NSFW.
Clik here to view.

讀書時間:Spectre 的攻擊方式

上次寫了 Meltdown 攻擊的讀書心得 (參考「讀書時間:Meltdown 的攻擊方式」),結果後來中獎狂流鼻水,加上 Spectre 用的手法就更複雜,慢慢看的情況就拖到最近才看完... 這邊就以讀者看過 Meltdown 那篇心得的前提來描述 Spectre。 Spectre 的精華在於 CPU 支援 branch prediction 與 out-of-order...

View Article


Windows 上的 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 Article


Image may be NSFW.
Clik here to view.

YJIT 帶給 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 Article

Image may be NSFW.
Clik here to view.

Fork 自微軟的 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 Article

Image may be NSFW.
Clik here to view.

LLVM 的更換授權進展

在 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


Image may be NSFW.
Clik here to view.

從簡單的 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
Browsing all 14 articles
Browse latest View live


Latest Images