Code Monkey home page Code Monkey logo

go-interface-values's Introduction

Go interface values

This repository deep dives Go interface values, what they are, how they work, and when storing a value in a Go interface allocates memory on the heap.

  • Labs: a step-by-step walkthrough of the topic
  • FAQ: answers to frequently asked questions
  • Links: links to related reference material
  • Thanks: it takes a community
  • Appendix: in-repo reference material

Labs

  1. Prerequisites: how to get from here to there
  2. Interface values: whatever you do, do not call it "boxing"
  3. Escape analysis: to malloc or not to malloc
  4. Missing mallocs: there's a heap of missing memory
  5. Lessons learned: key takeaways

FAQ

What does the Q suffix for instructions like MOVQ and LEAQ mean?

Please refer to this answer from the assembly section in the appendix.

What is the x86 assembly instruction CALL actually calling?

Please refer to this answer from the assembly section in the appendix.

Where is the CALL instruction in ARM assembly?

Please refer to this answer from the assembly section in the appendix.

What is the hack directory and the files inside of it?

The hack directory is a convention I picked up from working on Kubernetes and projects related to Kuberentes. The directory contains scripts useful to the project, but not a core piece of the project itself. For example:

Links

Thanks

  • Many thanks to reddit user nikandfor for their response to my post on this topic. Without that initial work, I am not sure this repository would exist today.
  • My gratitude to Crypto Jones from Gopher Slack for keeping me honest about "boxing." ๐Ÿ˜ƒ
  • My colleague Michael Gasch who spent a lot of time proofreading this repository. Hear that y'all? Any mistakes you find? Totally Michael's fault! ๐Ÿ˜ƒ
  • Andrew Williams, another co-worker, who did not judge me when he helpfully explained cache lines.
  • The first person who offered to help me dig into the assembly, Kevin Grittner!
  • Several of my colleagues who directed me to a Trie structure for the repository's bespoke test framework:
    • Michal Jankowski
    • Zhanghe Liu
    • Yiyi Zhou
    • Mayank Bhatt
    • Arunesh Pandey

Appendix

  • Assembly: reference section for go asm

go-interface-values's People

Contributors

akutz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-interface-values's Issues

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.