Unanswered Questions
86 questions with no upvoted or accepted answers
8
votes
0
answers
430
views
Engineering an even faster qsort
I understand that C++ STL template sort runs faster than qsort in C because ...
7
votes
0
answers
253
views
Error handling function (Win32/C)
I have written the following function to be a general "error logging" solution for my Windows API projects. Basically, given a Windows system error code (a la ...
7
votes
0
answers
541
views
Bidirectional bijective hash map in C
I have this bidirectional hash map in C for dealing with bijective maps. Each key mapping consists of a primary key and a secondary key, and I can ask the data structure to give me a secondary key ...
7
votes
0
answers
569
views
Red-black tree appears to be slower than std::multimap
I've written a red-black tree in C as an exercise. The tree works and it is not bad, but it is about 10% slower than std::multimap from libstdc++ which I'm ...
6
votes
0
answers
709
views
Simple virtual machine prototype for Lisp-style languages
I found a post I made here an year ago (Compiler for a minimal LISP dialect to run on the Java Virtual Machine) and got interested on this subject again. This time I decided to implement the ...
5
votes
0
answers
261
views
tbf - An Optimizing Brainfuck Interpreter and Transpiler in C
Language:
The Brainfuck programming language consists of eight commands:
...
5
votes
0
answers
109
views
Menu Parser in C
This is a simple program that parses a menu specification and creates a menu tree.
Why?
I want to create a menu application, where the user can select an entry in the menu, and either a submenu can ...
5
votes
0
answers
817
views
A POSIX getdelim() and getline() implementation for MSVC
Tired of always having problems in reading arbitrary length lines from file under Windows, I tried to write a POSIX getdelim() and ...
5
votes
0
answers
203
views
Single-threaded coroutine in C (Linux x86-64)
Background Story
I crafted a simple single-threaded coroutine in C, running on Linux x86-64.
Short Technical Explanation
1) Task
There are two types of tasks in this implementation.
Main task. This ...
5
votes
0
answers
187
views
Binary PATRICiA Prefix Trie
I was wondering if we could speed-up lookup in a hash table of strings by only storing the difference between them, like HAMT. Taking this idea to its end, I ended up with a binary PATRICiA prefix-...
5
votes
0
answers
1k
views
Transfer an array of unknown size from C to Python using Ctypes
I am new to Ctypes. I am writing a piece of code that brings an array of unknown size from C to Python using Ctypes. Unknown size here mean that Python initially doesn't know the size of the array. C ...
5
votes
0
answers
513
views
Cache conscious SIMD matrix multiply of unsigned integers
The goal of the code review by order of importance (i.e. What I hope to hear from you):
I've verified correctness using a straightforward matrix multiply function though I am open to those who want to ...
5
votes
0
answers
1k
views
Reusing curl easy handles in C
In a C project I want to reuse curl easy handles. The flow of program is like:
Client --> C Application --> Call URL1, do something, Call URL2, do something, Call URL3...
In short, for each client ...
4
votes
0
answers
60
views
16x16 integer matrix transpose using SSE2 intrinsics in C
I was inspired by this and this to make a C function that would take an array of 16 __m128i, treat it as a matrix of 16x16 ...
4
votes
0
answers
105
views
Performs interpolation binary search over an array. If value found returns found and index else returns not found and insertion index
Performs interpolation binary search over an array sorted in ascending order. If value found returns found and index else returns not found, the insertion index is returned.
Assumptions :
data is ...