Comments (9)
私以为 go 中要用到汇编主要是三个场景:
- 复杂的指针操作,放到汇编里可能更清晰。虽然对于 go 来说会有调用开销,大概 10ns 左右的损失
- 利用 SIMD 进行矢量计算或内存操作
- 针对 CPU Cache 的一些操作,如 prefetch ,穿透等
如果是想侧重实战,可能要讲一点上诉内容。如果是其它,可以侧重一下 go 的伪寄存器,go 汇编中的函数调用,也就是更多的讲汇编在 go 中的呈现方式
from advanced-go-programming-book.
@templexxx 目前定位是Go汇编语言本身。因为我自己对汇编也缺乏实战,对这个话题也无法提供参考。感觉你说的第一点很有意思,如果进展到相关内容再详细请教你。第二点可能会作为例子稍微提一下,重点还是BYTE实现对新指令对支持。第三点,当时你那个关于汇编优化的讲座,感觉对于普通读者太深了(我当前也没太听懂)
其实汇编对我也是现学现卖,在战争中学习战争。现慢慢充实内容,有了内容之后才好裁剪。
感谢你的建议
from advanced-go-programming-book.
@chai2010 我也就谈下自己的看法,谈不上建议,哈哈。共勉~
from advanced-go-programming-book.
ch3-02 暂时完结,后续再慢慢改
from advanced-go-programming-book.
ch3-03 done
from advanced-go-programming-book.
ch3-04 done
from advanced-go-programming-book.
ch3-05 done
from advanced-go-programming-book.
ch3-06 done
from advanced-go-programming-book.
为了继续赶后面的进度,先完结asm章。
asm还需要继续充电,以后还会再回来的
from advanced-go-programming-book.
Related Issues (20)
- 这一章节有错误: 1.5.6 基于Channel的通信 HOT 4
- 6.5 负载均衡 HOT 1
- 能不能换下封面页的图片 HOT 1
- 1.6 常见的并发模式中改进的素数筛实现有错误 HOT 1
- 1.4开头对init函数中启动新goroutine的描述有错误 HOT 1
- 2.7.2 C临时访问传入的Go内存
- 1.4.1 函数 闭包传值问题 HOT 1
- golang1.18版本的形参使用的寄存器传参? 和汇编章节使用栈的不太一样 HOT 2
- 关于附录A中的"独占CPU导致其它Goroutine饿死"
- 3.5.3 for 循环 的算法有问题 HOT 2
- 转为 mdbook 格式,gitbook 可以退了 HOT 3
- 第 3 章 3.6.1 节 的 “图 3-13 函数调用参数布局” 有点小问题 HOT 1
- getg build error: relocation target runtime.convT2E not defined HOT 2
- When run examples/ch2.1/hello-03/main.go , an error occurred
- 关于 “1.5.3 顺序一致性内存模型”中的疑问 HOT 3
- 3.6.1 函数调用参数布局图,pseudo SP的值有问题? HOT 1
- 2.7.4 针对Go指针检查的原理描述错误 HOT 1
- 4.1.2 更安全的 RPC 接口
- github.com/golang/protobuf/protoc-gen-go/generator已经被废弃
- 2.11 笔误
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advanced-go-programming-book.