Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AlgoLensNew to Visual Studio Code? Get it now.
AlgoLens

AlgoLens

saz-enforce

|
4 installs
| (0) | Free
See the algorithms behind your code. AlgoLens detects inefficient algorithms in real time and shows you how to optimize them instantly.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AlgoLens

See the algorithms behind your code.

AlgoLens is a local-first VS Code extension that detects inefficient algorithms in JavaScript and TypeScript as you type, shows you how to optimize them with measured numbers, and teaches the underlying concepts — with both beginner and expert explanations on every finding.

Install

From the VS Code marketplace, search for "AlgoLens" and install. The extension activates automatically when you open a .ts, .tsx, .js, or .jsx file.

What you get

  • 49 rules across 5 categories — performance, data structures, complexity, memory, and modernization. Every rule is gated by ≥95% precision on positive and negative fixtures.
  • Big-O CodeLens above non-trivial functions — live complexity badge in the editor. Constant-time functions are skipped to keep the editor quiet; the lens only appears when there's something worth noting (O(n) and worse). Click the lens to jump to the complexity lesson; hover for the full breakdown — confidence percentage and the heuristic factors that drove the estimate.
  • Activity bar badge with finding count — the AlgoLens icon shows the workspace-wide finding count, like Git's source-control badge. See at a glance whether AlgoLens has anything to say without expanding the sidebar.
  • Measured benchmarks in hover — for high-confidence rules, the popup shows the real speedup at n=100 / 1,000 / 10,000 (e.g. "~52× faster at n=10,000"). No competing extension surfaces this.
  • DSA learning mode — a topic-grouped sidebar links every rule to a hand-written lesson covering iteration, async, data structures, complexity, memory, and modern idioms.
  • Project-wide complexity report — one command emits a markdown report ranking every function in the workspace by Big-O severity, with file:line links.
  • 11 auto-fix code actions — one-click "Apply fix" on the highest-confidence rules.
  • Real-time analysis — typing never blocks. The scheduler debounces edits, cancels stale runs, and enforces a per-file time budget.
  • Beginner and expert modes — every finding ships with a one-sentence explanation, full reasoning, trade-offs, and when not to apply. Toggle from any hover.
  • Persistent ignore / snooze / restore — suppressions are keyed on AST coordinates plus an evidence hash, so they survive whitespace and comment edits.
  • Local-first — no source, no paths, no repo names ever leave your machine. Telemetry is off by default.

Quick tour

Surface Default What you see
Diagnostics warning / info squiggles High-confidence findings only, capped per file
Hover (rule) mouse over a squiggle Beginner explanation + measured benchmark + expert toggle
Hover (Big-O) mouse over a function declaration Big-O band + confidence + heuristic factors + lesson link
CodeLens above non-trivial functions Estimated Big-O (O(1) skipped to keep the editor quiet)
Activity bar AlgoLens icon Numeric badge with workspace-wide finding count
Findings activity bar → AlgoLens Every finding, grouped by file
Learn activity bar → AlgoLens Rules grouped by DSA topic, click for the linked lesson
Ignored activity bar → AlgoLens Active suppressions with one-click restore
Code actions right-click or quick-fix lightbulb Apply fix / ignore finding / ignore rule in file or workspace
Status bar bottom right $(pulse) AlgoLens: N for the active file

Commands

All under the AlgoLens prefix in the command palette:

  • AlgoLens: Toggle explanation mode (beginner/expert)
  • AlgoLens: Analyze workspace — schedule a full-workspace pass
  • AlgoLens: Generate complexity report — markdown report of every function ranked by Big-O
  • AlgoLens: Open Learn sidebar — focus the topic-grouped lessons
  • AlgoLens: Open findings sidebar
  • AlgoLens: Show ignored findings
  • AlgoLens: Restore all ignored findings

Per-finding ignore commands appear in the right-click menu and the quick-fix lightbulb.

Settings

Every setting lives under algolens.*. The defaults are tuned for low noise; medium-confidence rules stay in the sidebar.

  • algolens.surfacing.proactiveConfidenceThreshold (default 0.85) — confidence floor for diagnostics
  • algolens.surfacing.maxFindingsPerFile (default 5) — diagnostics cap per file
  • algolens.surfacing.disableProactive (default false) — kill switch for diagnostics; sidebar still shows everything
  • algolens.explanations.mode (default beginner) — beginner or expert
  • algolens.analysis.activeFileDebounceMs (default 200) — debounce after the last keystroke
  • algolens.analysis.perFileBudgetMs (default 80) — hard wall-clock budget per analysis run
  • algolens.analysis.maxFileSizeKb (default 500) — skip files larger than this
  • algolens.rules.disabled (default []) — rule IDs to disable entirely
  • algolens.rules.severityOverrides (default {}) — per-rule severity override
  • algolens.intelligence.acceptDetectionEditsWindow (default 5) — implicit-accept window
  • algolens.codelens.bigO.enabled (default true) — show estimated Big-O above each function
  • algolens.codelens.bigO.minimumConfidence (default 0.6) — hide CodeLens when estimator confidence is below this
  • algolens.learn.enabled (default true) — show the Learn sidebar
  • algolens.crossFile.enabled (default false) — preview: build a workspace symbol index so cross-file rules can detect issues that span files. Off by default until the first cross-file rule ships.
  • algolens.crossFile.crossProjectAnalysis (default false) — when enabled, the symbol index resolves callees across tsconfig.json project boundaries. Off by default; each tsconfig is analyzed independently.
  • algolens.crossFile.maxIndexedFiles (default 5000) — hard cap on files included in the workspace symbol index. Protects against runaway indexing in very large monorepos.
  • algolens.telemetry.enabled (default false) — opt-in only

Privacy

AlgoLens is local-first. The analysis engine is forbidden from importing any HTTP client — enforced by an ESLint gate that runs in CI. Telemetry is off by default and, even when enabled, the channel scrubs PII-shaped property keys (paths, source, repository names, usernames) before forwarding.

License

MIT © 2026 Muhammad Salman

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft