# Speed differences from vscode or as exe

**URL:** <https://ziggit.dev/t/speed-differences-from-vscode-or-as-exe/10914>\
**Category:** Explain\
**Created:** [July 11, 2025, 10:59am UTC](https://ziggit.dev/t/speed-differences-from-vscode-or-as-exe/10914 "2025-07-11T10:59:18Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [August 16, 2025, 9:39pm UTC](https://ziggit.dev/t/speed-differences-from-vscode-or-as-exe/10914/14 "2025-08-16T21:39:59Z")

</div>

I think you need to start using more tooling for example sampling and tracing profilers.  
Maybe try to use tracy.

I think if you want to make progress you need to make more detailed measurements, better benchmarking tools, or profilers can help with that.

If the speed test measurement itself doesn’t have a problem, then there still could be a number of things causing different throughputs (ideally you would measure more than just throughput):

- program being scheduled and switched between different cpus mid execution, causing varying additional latency added by the OS (should be visible with profiling tools)  
fix: pin the program on a single core, or use tools that distinguish between wall clock and actual runtime
- running the program on cpus with varying clockspeeds  
fix: set the cpu clock speed to a fixed value, during program execution
- address space layout randomization, causing different things in the program to be slow  
fix: have enough independent runs so that the variance between different runs gets washed out through determining the mean ([ideally the profiler would re-randomize](https://www.youtube.com/watch?v=r-TLSBdHe1A) the layout during the run of the program)

For benchmarks you also want a tool that is able to record system calls, cache misses, branch misses etc. (so that you have an easier time spotting possible causes)

If you find good tools to use under windows you can also add those to the tools section of this doc, or add a comment:

> [@Benchmarking](https://ziggit.dev/t/benchmarking/4675):
>
> What is a benchmark? A benchmark is an automated way to methodically collect measurements, possibly using those results in more or less automated ways. Benchmarking vs Profiling The basic distinction between benchmarking and profiling, is that benchmarking measures how: how fast is a routine, how much memory does it allocate. Profiling is concerned with where: how much time within a process is spent on which functions, and which lines, and the same for allocations, syscalls, and other resourc…

Some people on random forum posts I found, have mentioned [Windows Performance Analyzer | Microsoft Learn](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-analyzer) so that is another thing you could try, I am not on windows so I haven’t used it.

---

_[View the full topic](https://ziggit.dev/t/speed-differences-from-vscode-or-as-exe/10914)._
