# \#performance

**URL:** https://ziggit.dev/tag/performance/23.md

[Latest](https://ziggit.dev/latest.md) · [Categories](https://ziggit.dev/categories.md) · [Tags](https://ziggit.dev/tags.md)

---

## [Fool's errand - building the fastest numerical computation library](https://ziggit.dev/t/fools-errand-building-the-fastest-numerical-computation-library/17832)

<div class="topic-metadata">

**Author:** [@sfn](https://ziggit.dev/u/sfn)\
**Replies:** 10\
**Last updated:** [October 18, 2026, 10:36am UTC](https://ziggit.dev/t/fools-errand-building-the-fastest-numerical-computation-library/17832 "2026-10-18T10:36:24Z")

</div>

I may or may not end up figuring out how to write my own domain-specific high-performance physics simulators in the near future, but the possibility got me thinking about how to do the underlying calculations in the fast…

---

## [Introducing Zigrupt: a high-performance inter-thread event broadcasting library for Zig](https://ziggit.dev/t/introducing-zigrupt-a-high-performance-inter-thread-event-broadcasting-library-for-zig/18015)

<div class="topic-metadata">

**Author:** [@sarthakvk](https://ziggit.dev/u/sarthakvk)\
**Replies:** 0\
**Last updated:** [October 18, 2026, 2:22am UTC](https://ziggit.dev/t/introducing-zigrupt-a-high-performance-inter-thread-event-broadcasting-library-for-zig/18015 "2026-10-18T02:22:25Z")

</div>

Zigrupt Zigrupt is heavily inspired by the LMAX Disruptor. It lets application threads publish events once and have multiple handlers process every event, in order, on their own threads. It uses a ring buffer, atomics …

---

## [Most efficient binary (energy wise)](https://ziggit.dev/t/most-efficient-binary-energy-wise/17029)

<div class="topic-metadata">

**Author:** [@Luke](https://ziggit.dev/u/Luke)\
**Replies:** 5\
**Last updated:** [August 1, 2026, 9:16pm UTC](https://ziggit.dev/t/most-efficient-binary-energy-wise/17029 "2026-08-01T21:16:41Z")

</div>

What would produce the most energy efficient binary? Small or fast? I get that fast will try to produce as fewer instructions as possible but those might be consuming more energy (AVX512). I guess a combination of fast a…

---

## [Optimizing the Goertzel Algorithm](https://ziggit.dev/t/optimizing-the-goertzel-algorithm/16233)

<div class="topic-metadata">

**Author:** [@lufe](https://ziggit.dev/u/lufe)\
**Replies:** 0\
**Last updated:** [June 18, 2026, 12:33am UTC](https://ziggit.dev/t/optimizing-the-goertzel-algorithm/16233 "2026-06-18T00:33:31Z")

</div>

Hi everyone, for some years now I have a small tool that uses the Goertzel algorithm for spectral analysis. Since I moved the project to 0.16.0 the performance dropped a lot. The reason being Loop-Vectorization-Disable…

---

## [Can C++ Data Oriented Design Be ONE MILLION Times Faster? - Andrew Drakeford](https://ziggit.dev/t/can-c-data-oriented-design-be-one-million-times-faster-andrew-drakeford/15544)

<div class="topic-metadata">

**Author:** [@glfmn](https://ziggit.dev/u/glfmn)\
**Replies:** 2\
**Last updated:** [May 15, 2026, 3:36pm UTC](https://ziggit.dev/t/can-c-data-oriented-design-be-one-million-times-faster-andrew-drakeford/15544 "2026-05-15T15:36:32Z")

</div>

A talk about how understanding the context of the problem by solving a simpler, ancillary problem, can provide insights necessary for making big performance improvements.

---

## [\[Fixed\] Base overhead increased in 0.16](https://ziggit.dev/t/fixed-base-overhead-increased-in-0-16/15377)

<div class="topic-metadata">

**Author:** [@hkupty](https://ziggit.dev/u/hkupty)\
**Replies:** 14\
**Last updated:** [May 7, 2026, 2:34pm UTC](https://ziggit.dev/t/fixed-base-overhead-increased-in-0-16/15377 "2026-05-07T14:34:58Z")

</div>

Hi folks, no criticism here, just trying to understand stuff - have I done something wrong when porting to 0.16 or are those numbers among the expected baseline? So, I have a collection of small apps that I use on my da…

---

## [Oma - runtime SIMD dispatch for Zig](https://ziggit.dev/t/oma-runtime-simd-dispatch-for-zig/14438)

<div class="topic-metadata">

**Author:** [@attron](https://ziggit.dev/u/attron)\
**Replies:** 1\
**Last updated:** [March 3, 2026, 2:58pm UTC](https://ziggit.dev/t/oma-runtime-simd-dispatch-for-zig/14438 "2026-03-03T14:58:30Z")

</div>

Zig’s @Vector is quite nice, but its not without its issues. The most “in my face” one I encountered recently was trying to target multiple architectures / cpu instruction sets with a single function invocation. oma (on…

---

## [Need guidance for file readers and writers](https://ziggit.dev/t/need-guidance-for-file-readers-and-writers/13656)

<div class="topic-metadata">

**Author:** [@miagi](https://ziggit.dev/u/miagi)\
**Replies:** 3\
**Last updated:** [December 26, 2025, 5:25pm UTC](https://ziggit.dev/t/need-guidance-for-file-readers-and-writers/13656 "2025-12-26T17:25:28Z")

</div>

I’m trying to write a tool that will copy files in a sorted order and with as less fragmentation as possible on the filesystem. Comparing to GNU cp, I do get ~44% less fragmentation but the code is 15x slower. I’m thinki…

---

## [New Zigger exploring performance](https://ziggit.dev/t/new-zigger-exploring-performance/13006)

<div class="topic-metadata">

**Author:** [@WeeBull](https://ziggit.dev/u/WeeBull)\
**Replies:** 11\
**Last updated:** [November 23, 2025, 2:43pm UTC](https://ziggit.dev/t/new-zigger-exploring-performance/13006 "2025-11-23T14:43:27Z")

</div>

Hi all, I’m only a week or so into my Zig journey (so everything I’m doing is on 0.15.1), but I’m liking what I’m seeing. In order to help me learn the language I decided to take some C code and port it to Zig. My day j…

---

## [Strange performance difference between const and var](https://ziggit.dev/t/strange-performance-difference-between-const-and-var/12613)

<div class="topic-metadata">

**Author:** [@Naois](https://ziggit.dev/u/Naois)\
**Replies:** 5\
**Last updated:** [October 20, 2025, 7:27am UTC](https://ziggit.dev/t/strange-performance-difference-between-const-and-var/12613 "2025-10-20T07:27:49Z")

</div>

I’ve noticed some unexpected differences in performance when I change variables from var to const. My assumption would have been that when a value is const, it allows the compiler to make assumptions about the value that…

---

## [Inside Zig's New Writer](https://ziggit.dev/t/inside-zigs-new-writer/11698)

<div class="topic-metadata">

**Author:** [@n0s4](https://ziggit.dev/u/n0s4)\
**Replies:** 10\
**Last updated:** [August 31, 2025, 9:56am UTC](https://ziggit.dev/t/inside-zigs-new-writer/11698 "2025-08-31T09:56:34Z")

</div>

0.15 releasing thoroughly sidetracked me into writing a very long blog post about the new std.Io.Writer. Particularly proud of this diagram:

---

## [First Zig Blog (With Zine!)](https://ziggit.dev/t/first-zig-blog-with-zine/11110)

<div class="topic-metadata">

**Author:** [@n0s4](https://ziggit.dev/u/n0s4)\
**Replies:** 1\
**Last updated:** [July 22, 2025, 6:56pm UTC](https://ziggit.dev/t/first-zig-blog-with-zine/11110 "2025-07-22T18:56:12Z")

</div>

I just finished my first blog post on my new (and first) personal website made with Zine! I’ve never used an ssg before so the fact that getting started with zine felt so easy is a testament to the docs. I had to resort…

---

## [Techniques for optimizing compile time?](https://ziggit.dev/t/techniques-for-optimizing-compile-time/10811)

<div class="topic-metadata">

**Author:** [@ijdo](https://ziggit.dev/u/ijdo)\
**Replies:** 5\
**Last updated:** [July 5, 2025, 10:41am UTC](https://ziggit.dev/t/techniques-for-optimizing-compile-time/10811 "2025-07-05T10:41:37Z")

</div>

I extensively (ab)use comptime. Right now my debug-build compile time is reaching 41s on a very powerful Mac (forgive me that). Are there any tools or techniques people use to profile/optimize compile times? e.g. I’d lo…

---

## [High-performance AI/LLM implementation idea - thoughts?](https://ziggit.dev/t/high-performance-ai-llm-implementation-idea-thoughts/10371)

<div class="topic-metadata">

**Author:** [@Triex](https://ziggit.dev/u/Triex)\
**Replies:** 8\
**Last updated:** [June 15, 2025, 3:40am UTC](https://ziggit.dev/t/high-performance-ai-llm-implementation-idea-thoughts/10371 "2025-06-15T03:40:53Z")

</div>

Hi Ziggit! I’ve been exploring how Zig’s performance characteristics could work with large language models, specifically the DeepSeek architecture. Had this idea: what if we could leverage Zig’s compile-time metaprogram…

---

## [Massive slowdown with Vectors as well as slightly different loop, can't figure out why](https://ziggit.dev/t/massive-slowdown-with-vectors-as-well-as-slightly-different-loop-cant-figure-out-why/10230)

<div class="topic-metadata">

**Author:** [@CommonZense](https://ziggit.dev/u/CommonZense)\
**Replies:** 16\
**Last updated:** [May 28, 2025, 4:23pm UTC](https://ziggit.dev/t/massive-slowdown-with-vectors-as-well-as-slightly-different-loop-cant-figure-out-why/10230 "2025-05-28T16:23:06Z")

</div>

Full code at bottom. I have a nested array of arrays of ints and am iterating over the pairwise combinations of them and doing some math. My first attempt simply iterated over the length of a nested array and did elemen…

---

## [Scoop: Darwin performance counter observation library](https://ziggit.dev/t/scoop-darwin-performance-counter-observation-library/9013)

<div class="topic-metadata">

**Author:** [@tensorush](https://ziggit.dev/u/tensorush)\
**Replies:** 1\
**Last updated:** [March 23, 2025, 4:33pm UTC](https://ziggit.dev/t/scoop-darwin-performance-counter-observation-library/9013 "2025-03-23T16:33:27Z")

</div>

Darwin 64-bit performance counter observation library that requires root privileges (sudo). Based on this kperf C demo. See examples: Function Calling Process Tracing P.S. The name is a twist on poop since s…

---

## [Zig build not using all the cores](https://ziggit.dev/t/zig-build-not-using-all-the-cores/8111)

<div class="topic-metadata">

**Author:** [@jamelgo](https://ziggit.dev/u/jamelgo)\
**Replies:** 2\
**Last updated:** [January 23, 2025, 7:30pm UTC](https://ziggit.dev/t/zig-build-not-using-all-the-cores/8111 "2025-01-23T19:30:36Z")

</div>

Hello everyone, I noticed that when I try to build a project, only one core is being used in my laptop. I’m using zig version 0.14.0-dev.2851+b074fb7dd and just tried building zls master branch and I got this CPU usage …

---

## [Why is my Zig program so much slower than my C program?](https://ziggit.dev/t/why-is-my-zig-program-so-much-slower-than-my-c-program/4799)

<div class="topic-metadata">

**Author:** [@coredump](https://ziggit.dev/u/coredump)\
**Replies:** 14\
**Last updated:** [June 21, 2024, 7:00pm UTC](https://ziggit.dev/t/why-is-my-zig-program-so-much-slower-than-my-c-program/4799 "2024-06-21T19:00:42Z")

</div>

Writing a program using TurboJPEG. I have a C version and a Zig version. The C version completely blows the Zig version out of the water. What am I doing wrong? Zig code: const std = @import("std"); const c = @cImport(…

---

## [Benchmarking isDigit](https://ziggit.dev/t/benchmarking-isdigit/4604)

<div class="topic-metadata">

**Author:** [@AndrewCodeDev](https://ziggit.dev/u/AndrewCodeDev)\
**Replies:** 47\
**Last updated:** [June 19, 2024, 9:09am UTC](https://ziggit.dev/t/benchmarking-isdigit/4604 "2024-06-19T09:09:05Z")

</div>

Edit: moved from previous thread. Hey, @endlessly\_amused, I’d recommend trying it out on godbolt before going to github. In terms of branches, it’s not doing quite what I’d expect. First, let’s reduce the function you…

---

## [Can anyone provide compilation speed comparisons for their project 0.10.1 to 0.11.x (dev version)?](https://ziggit.dev/t/can-anyone-provide-compilation-speed-comparisons-for-their-project-0-10-1-to-0-11-x-dev-version/1241)

<div class="topic-metadata">

**Author:** [@andrewrk](https://ziggit.dev/u/andrewrk)\
**Replies:** 16\
**Last updated:** [May 8, 2024, 8:03pm UTC](https://ziggit.dev/t/can-anyone-provide-compilation-speed-comparisons-for-their-project-0-10-1-to-0-11-x-dev-version/1241 "2024-05-08T20:03:30Z")

</div>

I’d like to provide some performance data points in the release notes for the upcoming 0.11.x release. Does anyone have a medium-to-large sized project that has a branch that compiles with zig 0.10.x and a branch that co…

---

## [Performance Excuses Debunked](https://ziggit.dev/t/performance-excuses-debunked/3509)

<div class="topic-metadata">

**Author:** [@Sze](https://ziggit.dev/u/Sze)\
**Replies:** 4\
**Last updated:** [March 9, 2024, 1:09pm UTC](https://ziggit.dev/t/performance-excuses-debunked/3509 "2024-03-09T13:09:44Z")

</div>

---

## [Unintentional Copy On Capture](https://ziggit.dev/t/unintentional-copy-on-capture/3140)

<div class="topic-metadata">

**Author:** [@AndrewCodeDev](https://ziggit.dev/u/AndrewCodeDev)\
**Replies:** 15\
**Last updated:** [February 11, 2024, 3:18pm UTC](https://ziggit.dev/t/unintentional-copy-on-capture/3140 "2024-02-11T15:18:58Z")

</div>

Zig’s capture syntax can unpack objects by value or by pointer: for (slice) |elem| { // elem has been captured by value (copy) } for (slice) |\*elem| { // elem has been captured by pointer (reference) } Capturing…

---

## [Zpu-bench - calculating degree of parallelism (DOP)](https://ziggit.dev/t/zpu-bench-calculating-degree-of-parallelism-dop/3103)

<div class="topic-metadata">

**Author:** [@wfouche](https://ziggit.dev/u/wfouche)\
**Replies:** 1\
**Last updated:** [February 2, 2024, 8:15pm UTC](https://ziggit.dev/t/zpu-bench-calculating-degree-of-parallelism-dop/3103 "2024-02-02T20:15:33Z")

</div>

Hello, zpu-bench is the first Zig program that I have written; it was a lot of fun! I have previously implemented a similar program in a combination of Python and C, but this new cleanroom implementation in Zig is self-…

---

## [Performance/Optimization tooling and resources](https://ziggit.dev/t/performance-optimization-tooling-and-resources/2974)

<div class="topic-metadata">

**Author:** [@wrapitup](https://ziggit.dev/u/wrapitup)\
**Replies:** 2\
**Last updated:** [January 23, 2024, 11:06am UTC](https://ziggit.dev/t/performance-optimization-tooling-and-resources/2974 "2024-01-23T11:06:46Z")

</div>

Zig is my first language where there is more to performance optimization than just using microbenchmarks or using a profiler for an interpreted language. I’m getting familiar with the different aspects of optimization su…

---

## [Performance of reading a file line by line in Zig](https://ziggit.dev/t/performance-of-reading-a-file-line-by-line-in-zig/2319)

<div class="topic-metadata">

**Author:** [@slonik-az](https://ziggit.dev/u/slonik-az)\
**Replies:** 2\
**Last updated:** [December 1, 2023, 10:22am UTC](https://ziggit.dev/t/performance-of-reading-a-file-line-by-line-in-zig/2319 "2023-12-01T10:22:09Z")

</div>

Karl Seguin again published a very insightful article about Zig Performance of reading a file line by line in Zig This time it is about why reading text files line-by-line in Zig is 4x slower than in Go lang and what to…

---

## [SYCL 2023: Proficient Parallel Programming by King Butcher](https://ziggit.dev/t/sycl-2023-proficient-parallel-programming-by-king-butcher/1330)

<div class="topic-metadata">

**Author:** [@mattnite](https://ziggit.dev/u/mattnite)\
**Replies:** 18\
**Last updated:** [August 8, 2023, 2:23am UTC](https://ziggit.dev/t/sycl-2023-proficient-parallel-programming-by-king-butcher/1330 "2023-08-08T02:23:55Z")

</div>

---

## [Where is the difference between this cpp and zig code?](https://ziggit.dev/t/where-is-the-difference-between-this-cpp-and-zig-code/1314)

<div class="topic-metadata">

**Author:** [@markus](https://ziggit.dev/u/markus)\
**Replies:** 14\
**Last updated:** [July 30, 2023, 7:55pm UTC](https://ziggit.dev/t/where-is-the-difference-between-this-cpp-and-zig-code/1314 "2023-07-30T19:55:14Z")

</div>

My friend and I compared zig and cpp based on this little code snippet. Mine is from a little program i made, his is an attempt at recreating what I did. Thing is, that I can’t read cpp and he cant read zig, at least not…
