codingspirit
247 posts

codingspirit retweetledi

Getting there, eventually. Self-hosted WEBSPY SDR from a RPi5 using an Airspy R2.
You can try it: prog.airspy.com:33334
English
codingspirit retweetledi
codingspirit retweetledi


@atorstling @StokeWillie But only as view.. it's not modifiable, with remove or append
English

@codingspirit_de @StokeWillie Yes, well std::vector was never a good general view type anyways. std::span does the job better.
English

@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

@codingspirit_de It’s called std::span. All standard C++ contiguous containers can be implicitly converted to a corresponding span.
English

@atorstling @StokeWillie Yes, that works ..
but you have a new incompatible type!
x.com/i/status/20719…
codingspirit@codingspirit_de
@StokeWillie Nice .. but can i pass it to functions, expecting std::vector<>, by reference? How to let an existing function append entries .. or simply read it .. - or do i need something like a string_view?
English

@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
codingspirit retweetledi
codingspirit retweetledi

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
codingspirit retweetledi
codingspirit retweetledi

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@RuujSs
English
codingspirit retweetledi

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/…

English

@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
codingspirit retweetledi
codingspirit retweetledi
codingspirit retweetledi

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.

English
codingspirit retweetledi

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!

English

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











