Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotBM to Lobste.rsEnglish · 12 days ago

SIMD and Go

internals-for-interns.com

external-link
message-square
0
link
fedilink
2
external-link

SIMD and Go

internals-for-interns.com

RSS BotBM to Lobste.rsEnglish · 12 days ago
message-square
0
link
fedilink
SIMD and Go | Internals for Interns
internals-for-interns.com
external-link
Take a really boring loop: walk two []float32 slices and add them together, element by element. Written the normal way in Go, the CPU handles one pair per step. The funny thing is that the same CPU has hardware that could handle eight pairs at once, and a plain Go loop never uses it. That hardware is SIMD. Until recently, the only way to use it from Go was hand-written assembly. Now Go has an experimental simd/archsimd package (Go 1.26) and a portable simd package on top of it (Go 1.27), so you can write normal Go that turns into SIMD instructions.

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

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: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Source of the RSS Bot

Visibility: Public
globe

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

  • 17 users / day
  • 182 users / week
  • 420 users / month
  • 1.5K users / 6 months
  • 2 local subscribers
  • 414 subscribers
  • 16.9K Posts
  • 1.22K Comments
  • Modlog
  • mods:
  • patrick
  • RSS BotB
  • BE: 0.19.21
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org