Skip to content

Collect various materials in the process of learning go plan9 assembly and share notes.

Notifications You must be signed in to change notification settings

ahfuzhang/learning_go_plan9_assembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

learning_go_plan9_assembly

Collect various materials in the process of learning go plan9 assembly and share notes.

Documents to download

Examples

Notes

(Chinese)

说说我的感受:

  • 摩尔定律走到尽头,算法优化走入深水区
  • 从 clickhouse 的经验来看, 向量化+JIT 是未来算法深入优化的方向
  • golang 做系统软件当然比不上 c++ 和 rust ,但越来越多的云上大系统使用 golang,因此进一步提升 golang 的运行效率势在必行
  • 某些热点可以用 cgo 编写代码,然后使用 fastcgo 调用
    • 编译仍然很麻烦
    • fastcgo 会产生额外的 runtime._ExternalCode 开销(还没搞明白为什么)
  • 某些工具号称可以把 intel 汇编转换成 go plan9 汇编:
  • 某些库可以用 golang 的语法来写汇编,然后以 jit 的方式编译为函数:

总之,在 golang 原生支持 SIMD 之前,学习 plan9 汇编还是非常有必要的。 plan9汇编资料少,且很多指令与官方文档不一致,还要特殊考虑怎么与 golang 结合。 这里面有大量我不会的知识,实在令人兴奋。(又可以玩一个烧脑的东西玩很久了)

笔记的整理计划如下:

  1. 把 plan9 汇编的基本用法都收集一遍
  2. 基于 amd64 平台,写各种例子
  3. 对 AVX2 的常用指令集做一个对照表,方便像使用 gcc 的内置函数一样写 simd 代码。
  4. 做一些工具,成为一个更靠谱的汇编代码的生成器
  5. 做一些 JIT 的框架,通过简单的编写就能产生高性能的向量化代码。

有兴趣的人也可以一起参与。 :-)

About

Collect various materials in the process of learning go plan9 assembly and share notes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published