Lemmy.Radio
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
sanitation to Golang@programming.dev · 6 hours ago

Understanding the Go Runtime: Slices, Maps, and Channels

internals-for-interns.com

external-link
message-square
0
link
fedilink
4
external-link

Understanding the Go Runtime: Slices, Maps, and Channels

internals-for-interns.com

sanitation to Golang@programming.dev · 6 hours ago
message-square
0
link
fedilink
Slices, Maps, and Channels | Internals for Interns
internals-for-interns.com
external-link
So far in this series we’ve looked at the parts of the Go runtime that orchestrate execution — the memory allocator, the scheduler, the garbage collector, sysmon, the netpoller. Today we’re switching gears and looking at three of the most ordinary things in Go: slices, maps, and channels. They are the bread and butter of every Go program. You probably write all three of them several times before lunch. But “ordinary” is doing a lot of work in that sentence. None of these are language primitives in the way an int is — they all have real, non-trivial data structures behind them, allocated on the heap, managed by the runtime, and tuned aggressively for performance. The syntax (s[i], m[k], <-ch) hides all of that, and that’s the point. But once you peel the syntax back, what’s actually sitting in memory? That’s the question we’re going to answer.
alert-triangle
You must log in or # to comment.

Golang@programming.dev

golang@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !golang@programming.dev

This is a community dedicated to the go programming language.

Useful Links:

  • Go Website
  • Effective Go
  • Go by Example
  • How to Start a Go Project

Rules:

  • Posts must be relevant to Go
  • No NSFW content
  • No hate speech, bigotry, etc
  • Try to keep discussions on topic
  • No spam of tools/companies/advertisements
  • It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 13 users / day
  • 39 users / week
  • 82 users / month
  • 240 users / 6 months
  • 1 local subscriber
  • 2.68K subscribers
  • 208 Posts
  • 111 Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • RandomDevOpsDude@programming.dev
  • austin@programming.dev
  • BE: 0.19.17
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org