Skip to main content
9 votes

BRESort - Bitwise Relationship Extraction - Intelligent Adaptive Sorting Engine for 32/64-bit & Floating-Point Data

I advise against having an interface start out as elaborate as in bresort_research.h - imagine having to keep everything backwards compatible. I see a lot of code repeating - a maintenance nightmare ...
greybeard's user avatar
  • 7,769
8 votes

My BRESort adaptive sorting engine in C

Without seeing all of the code, based only on what I can see, I'm not a fan of the 0, 1, and ...
Chris's user avatar
  • 4,764
8 votes

BRESort - Bitwise Relationship Extraction - Intelligent Adaptive Sorting Engine for 32/64-bit & Floating-Point Data

Naming A consistent prefix is useful, yet code makes public ...
chux's user avatar
  • 36.4k
6 votes

My BRESort adaptive sorting engine in C

I think overall readability OK. There is an ambiguity in the documentation in the header: Minimal memory overhead (256 bytes) - does this mean maximal overhead is ...
greybeard's user avatar
  • 7,769
6 votes
Accepted

Mandelbrot set visualizer using GTK4, Cairo and POSIX threads in C

Improve thread synchronization You have quite a bit of code for synchronizing the completion of the worker threads. It is more complicated than necessary, there is at least one bug, and in ...
G. Sliepen's user avatar
  • 69.3k
5 votes

Computing the smallest number of the form floor(8^N / 7) that is greater or equal to a number

is there a more direct way? Look up table With 32-bit int, level is so limited in range as ...
chux's user avatar
  • 36.4k
4 votes

My BRESort adaptive sorting engine in C

Compiler warnings Code performs about 10 casual signed to/from unsigned conversions. Consider enabling more compiler warnings to identify. Array sizing As an alternative for ...
chux's user avatar
  • 36.4k
4 votes

My BRESort adaptive sorting engine in C

In addition to the previous answers, here are some other minor suggestions. Documentation There are a lot of helpful comments. It would be good to explain what "BRE" stands for, if it is an ...
toolic's user avatar
  • 15.9k
4 votes

K&R Exercise 5-10. reverse Polish calculator

Return values Several of your functions print error messages. While it's fantastic that you correctly print these messages to stderr instead of ...
Chris's user avatar
  • 4,764
4 votes

Reservation app in C with linked list, BST, and CSV

The recursive call in printListRecursive() is not needed, and could be a simple while loop: ...
silver drake's user avatar
3 votes

Operator-precedence calculator in C

Strongly consider using braces consistently. In reduce notably you have an if without curly braces, and then curly braces around ...
Chris's user avatar
  • 4,764
2 votes

Split linked list into odd and even

Allow me to propose a suggestion: in order to split the input list into odd/even sublists, I suggest you keep the actual source list intact and produce from it two desired odd + even sublists. I had ...
coderodde's user avatar
  • 32.1k
2 votes

Computing the smallest number of the form floor(8^N / 7) that is greater or equal to a number

0x49249249 consider giving it a name - approximation of the multiplicative inverse of 7 mod the power of 2 that is the least multiple of 3 no less than the number ...
1 vote

Computing the smallest number of the form floor(8^N / 7) that is greater or equal to a number

For fun, consider a tree of depth log2(X_MAX). Is there a more direct way (loop-free) to compute this number than computing a level and then going back? A simple binary decision tree with 4 compares....
1 vote

C single-linked list with remove

The code compiles cleanly with a good set of warning options enabled - well done. A common idiom is to combine structure definition and type naming, rather than the separate ...
Toby Speight's user avatar
  • 88.4k

Only top scored, non community-wiki answers of a minimum length are eligible