codingspirit

247 posts

codingspirit banner
codingspirit

codingspirit

@codingspirit_de

Germany Katılım Eylül 2014
66 Takip Edilen13 Takipçiler
codingspirit retweetledi
prog
prog@lambdaprog·
Getting there, eventually. Self-hosted WEBSPY SDR from a RPi5 using an Airspy R2. You can try it: prog.airspy.com:33334
English
3
15
73
3.1K
codingspirit
codingspirit@codingspirit_de·
@straceX Controlling UB makes us to magicians 😉😂
English
0
0
1
41
Strace
Strace@straceX·
C++ engineers fear undefined behavior the way sailors fear the sea: professionally, and while living on it.
English
9
10
114
5.6K
codingspirit retweetledi
prog
prog@lambdaprog·
Good progress. All the mode work fine and the streaming seems to be smooth. The SpyServer streams the main FFT and the IF IQ. The DSP is done in the browser. #airspy
English
1
6
53
3.4K
Stoke Willie
Stoke Willie@StokeWillie·
In C++26, a standard "in-place" vector can provide contiguous storage for non-movable, non-copyable, non-default-constructible types.
Stoke Willie tweet media
Français
5
2
51
10.7K
codingspirit
codingspirit@codingspirit_de·
@StokeWillie span isn't modifiable inside the function: no remove, no append, .. and of course, you need to modify the function to accept span - instead of vector
English
0
0
0
13
Stoke Willie
Stoke Willie@StokeWillie·
@codingspirit_de It’s called std::span. All standard C++ contiguous containers can be implicitly converted to a corresponding span.
English
1
0
1
72
Alexander Torstling
Alexander Torstling@atorstling·
@StokeWillie Thanks. I recently ran into a use case for this, not having access to C++26, and I figured out that you can also implement a similar container with std::allocator. It allows you to easily allocate contiguous uninitialized storage without needing to fiddle with byte arrays.
English
2
0
2
351
codingspirit retweetledi
Arika
Arika@Arikalabs·
In a multi-process system, futexes use a global kernel hash table to track waiters, adding overhead. If your threads share memory but are in the same process, FUTEX_PRIVATE_FLAG tells the kernel to skip the shared hash, drastically reducing lock latency.
Arika tweet media
English
2
4
31
1.4K
codingspirit retweetledi
OS Dev
OS Dev@OSdev_·
This is a brilliant article. SmallVector::push_back() seems simple: if (size == capacity) grow(); data[size++] = value; But its performance is mostly decided by compiler code generation, not the algorithm. The fast path ("size < capacity") is executed almost every time. The slow path ("grow()") only runs when the inline buffer is full. Since "grow()" is a function call, it can overwrite caller-saved registers. If both paths share the same "store element" block, the compiler often has to spill registers to the stack and reload them after "grow()", increasing register pressure and instruction count. The below article explains that tail duplication produces better assembly: - Fast path -> store -> return - Slow path -> "grow()" -> store -> return Instead of merging both paths into one shared store block. The result: • No unnecessary register spills on the hot path • Better register allocation • Fewer loads/stores to the stack • Smaller hot code for better I-cache and instruction decode efficiency LLVM's shrink-wrapping optimization can't solve this because the problem isn't the function prologue, it's the shared control flow after "grow()". A great example of how control-flow layout and register allocation can matter more than the data structure itself. Saving just a couple of instructions in a function called billions of times can noticeably reduce LLVM compile time.
[email protected]@HaskRay

maskray.me/blog/2026-06-2… "A deep dive into SmallVector::push_back". SmallVector::push_back optimization has made clang faster.

English
3
4
72
7.8K
codingspirit retweetledi
Arika
Arika@Arikalabs·
Before C++20, implementing efficient condition variables meant wrapping OS-level futex or pthread_cond. C++20 added wait and notify directly to std::atomic, allowing the compiler to map directly to the fastest OS primitive without mutex overhead.
Arika tweet media
English
6
11
149
7.3K
codingspirit retweetledi
Ruuj
Ruuj@RuujSs·
The Kalman filter isn't a separate algorithm. It's recursive least squares wearing a state-space costume. That's the actual conclusion of Tony Lacey's tutorial. Most people learn the KF as a tool. This is the KF as what it actually is. Bookmark! Worth ten minutes.
Ruuj tweet media
Ruuj@RuujSs

x.com/i/article/2066…

English
10
86
577
41.2K
codingspirit retweetledi
AADITYANSHA
AADITYANSHA@aadityansha_06·
Optimized 1024 * 1024 matrix multiplication in pure C from naive to tiling to SIMD avx register on my i3 2nd gen CPU and benchmark it against OpenBlas and here's the result Feel free to explore, modify, benchmark, or improve it. github.com/aadityansha06/…
AADITYANSHA tweet media
English
8
11
43
53.9K
codingspirit
codingspirit@codingspirit_de·
@PythonPr Sorry, this the basic demonstration of how a neuron fires .. but it does NOT explain how neural networks or machine learning works at all!
English
2
0
0
174
Python Programming
Python Programming@PythonPr·
How AI really works. This tiny operation, repeated across millions of neurons, powers ChatGPT, Grok, image models, and everything in between.
English
16
116
750
60.7K
codingspirit retweetledi
tetsuo
tetsuo@tetsuoai·
Benjamin Bycroft’s 3D interactive tool visualizes an LLM’s layers, weights and matrix operations. This is the best educational tool to understand how an LLM works i've seen. httpx://bbycroft.net/llm
English
19
155
826
29.8K
codingspirit retweetledi
How To Prompt
How To Prompt@HowToPrompt__·
A Japanese dev open-sourced a drop-in replacement for NumPy that runs on your GPU. It's called CuPy. Change one line import “numpy as np” → “import cupy as cp” and the same code runs up to 100x faster on CUDA. → Works with existing NumPy/SciPy code → No rewrite. No new syntax. → Also supports AMD ROCm 100% Open Source.
How To Prompt tweet media
English
25
298
2.1K
100.9K
codingspirit retweetledi
prog
prog@lambdaprog·
It's that time of the year again! Check our generous 20% discount on all #Airspy products during this super hot summer! airspy.com/purchase Our traditional game resumes: #Like and #Retweet to participate and possibly win a #Freebie shipped to you anywhere in the world!
prog tweet media
English
4
55
97
12.3K
AADITYANSHA
AADITYANSHA@aadityansha_06·
I was about to optimize it more and put the methodology of How I did it, However this Sunday I went to thermal paste my CPU and the guy fucked my motherboard, probably would have to buy Tommorow to code again, for last few days it's been irritating for me due to this
AADITYANSHA@aadityansha_06

Optimizing 1024 * 1024 matrix multiplication in pure C by just using standard library and so far i have achieved 0.588 sec from 58 sec in naive on my i3 2nd gen processor with dual core and still about to do tiling and prefetching.

English
1
0
11
455