Skip to main contentHomepage

BenchIt

A VSCode extension for micro benchmarking

Svelte
Benchmarking
Performance
Open Source
Jan 1, 2021
BenchIt

BenchIt: A Micro-Benchmarking Tool for VSCode

BenchIt is a Visual Studio Code extension designed to make micro-benchmarking JavaScript functions effortless. It provides real-time performance tracking, automatic updates on code changes, and visualization of benchmarking results—all within VSCode.

I found that accurately benchmarking an algorithm is actually quite hard for these reasons:

  • A local machine always has background processes going on (even when running on another thread)
  • Javascript's JIT (Just in time) compiler actually does quite a lot of optimisations, things that you need to rollback in order to gain an accurate picture of the actual algorithm.

Key features include:

  • Benchmarking on a seperate thread, doesn't slow you down!
  • Example-based parameter declarations – easily define test cases.
  • Dynamic benchmarking – supports scaling input sizes to observe performance shifts of your algorithm as sizes change differ
Graph of 3 different sort algorithm performance as data size increases
  • Recursive function support – benchmark nested functions.

Developed using Svelte, BenchIt integrates into VSCode, offering an intuitive way to measure execution speed. Still In pre-release, it aims to refine benchmarking workflows for developers.

In order to get to V1 I would need to get back to solving these problems:

  • Typescript support
  • Node Module support