explaingit

loov/lensm

Analysis updated 2026-07-03

3,691GoAudience · developerComplexity · 2/5Setup · easy

TLDR

A Go tool that shows your compiled code and the assembly instructions it generates side by side, so you can see exactly what the CPU will run.

Mindmap

mindmap
  root((lensm))
    What it does
      Side by side view
      Source and assembly
      Watch mode auto refresh
    How to use
      Install with go install
      Point at compiled binary
      Filter by function name
    Use cases
      Spot compiler optimizations
      Understand CPU instructions
      Debug performance issues
    Audience
      Go developers
      Performance engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Inspect assembly output for a specific Go function to spot unexpected compiler behavior.

USE CASE 2

Watch a binary update in real time as you recompile, to track how code changes affect generated instructions.

USE CASE 3

Check whether the Go compiler is applying optimizations like inlining or loop unrolling to your hot paths.

What is it built with?

Go

How does it compare?

loov/lensmfortio/fortiogetlantern/systray
Stars3,6913,6913,699
LanguageGoGoGo
Setup difficultyeasyeasymoderate
Complexity2/52/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Binary must be compiled on your own machine so lensm can access the original source files.

License terms are not described in the explanation.

In plain English

Lensm is a tool for Go programmers who want to look at the low-level machine instructions that the Go compiler produces from their code. When you write a program in Go, the compiler translates your readable code into assembly: a much lower-level set of instructions that the CPU actually executes. Seeing both side by side can help developers understand what the computer is doing, spot performance issues, or check that the compiler is optimizing things as expected. You install the tool with a single Go command, open it, and point it at a compiled binary on your machine. You provide a text pattern matching a function name, and lensm displays that function's source code alongside the corresponding assembly instructions. A screenshot in the repository shows the side-by-side view. The watch flag lets the tool monitor the binary and refresh automatically whenever it is recompiled, which is practical during an active development session. The README notes that the binary must be compiled on your own machine, because lensm needs access to the original source files to display them next to the assembly output. For most people, this tool is only relevant if you are working in Go and have a reason to inspect low-level compiler output. The author wrote a blog post (linked in the README) explaining the motivation and how the core functionality works. The README is very brief and does not describe the full interface or all available options, so the tool may have capabilities beyond what is covered here.

Copy-paste prompts

Prompt 1
I'm using lensm to view assembly for my Go function. The side-by-side view shows an extra CALL instruction I didn't expect. Help me understand what Go code pattern might cause that.
Prompt 2
Show me how to install lensm and point it at a compiled Go binary to inspect the assembly for a function called 'processRequest'.
Prompt 3
I want to use lensm's --watch flag during development. Walk me through a workflow where I edit my Go code, recompile, and see the assembly refresh automatically.
Prompt 4
Using lensm output, help me identify which parts of my Go function are not being inlined by the compiler and why.

Frequently asked questions

What is lensm?

A Go tool that shows your compiled code and the assembly instructions it generates side by side, so you can see exactly what the CPU will run.

What language is lensm written in?

Mainly Go. The stack also includes Go.

What license does lensm use?

License terms are not described in the explanation.

How hard is lensm to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is lensm for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub loov on gitmyhub

Verify against the repo before relying on details.