Coder Social home page Coder Social logo

Comments (9)

templexxx avatar templexxx commented on May 2, 2024

私以为 go 中要用到汇编主要是三个场景:

  1. 复杂的指针操作,放到汇编里可能更清晰。虽然对于 go 来说会有调用开销,大概 10ns 左右的损失
  2. 利用 SIMD 进行矢量计算或内存操作
  3. 针对 CPU Cache 的一些操作,如 prefetch ,穿透等

如果是想侧重实战,可能要讲一点上诉内容。如果是其它,可以侧重一下 go 的伪寄存器,go 汇编中的函数调用,也就是更多的讲汇编在 go 中的呈现方式

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

@templexxx 目前定位是Go汇编语言本身。因为我自己对汇编也缺乏实战,对这个话题也无法提供参考。感觉你说的第一点很有意思,如果进展到相关内容再详细请教你。第二点可能会作为例子稍微提一下,重点还是BYTE实现对新指令对支持。第三点,当时你那个关于汇编优化的讲座,感觉对于普通读者太深了(我当前也没太听懂)

其实汇编对我也是现学现卖,在战争中学习战争。现慢慢充实内容,有了内容之后才好裁剪。

感谢你的建议

from advanced-go-programming-book.

templexxx avatar templexxx commented on May 2, 2024

@chai2010 我也就谈下自己的看法,谈不上建议,哈哈。共勉~

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

ch3-02 暂时完结,后续再慢慢改

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

ch3-03 done

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

ch3-04 done

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

ch3-05 done

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

ch3-06 done

from advanced-go-programming-book.

chai2010 avatar chai2010 commented on May 2, 2024

为了继续赶后面的进度,先完结asm章。
asm还需要继续充电,以后还会再回来的

from advanced-go-programming-book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.