BinarySearchTreeExercises
Heap-Layers
BinarySearchTreeExercises | Heap-Layers | |
---|---|---|
6 | 2 | |
0 | 373 | |
- | - | |
0.0 | 4.0 | |
about 2 years ago | 9 days ago | |
C++ | C++ | |
GNU General Public License v3.0 only | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
BinarySearchTreeExercises
-
How does one learn low latency programming?
Trippy and kind of cool. Don't remember if I knew that. I did make this red black tree map last May though. The only problem is I wrote the code without the key being const, but because a major part of my tree changing methodology was using std::swap which at the time I couldn't figure out how to replicate involving a const key, I left it that way. Partially it was due to the basis coming from following a tutorial in Java I think. But since it was only affecting me at the time with the iterator, I did a hack with some lambdas to make the iterator operators work like this:
-
General programming question, but asking it here as I suspect every language community is a little bit different. What is the correct balance between (extracting out as much logic as possible to other functions + making one's variable/method names explain the code) and (writing detailed comments)?
This is theDS project that I have spent 2 weeks on and have not commented almost at all on. A red black tree map, I did not have anything well defined concerning how much I was going to end up doing with it, so it has evolved into what it is now. If I do anything more with it, it will probably be just to add in the rest of the special members and maybe 2 unary operators (+ and -) to the Iterator.
-
Against my expectations, the code on top is noticeably slower than the code on the bottom, why?
Regarding the formatting, it took me a little while but I installed clang-format and went through the options, it was close between google and gnu but I went with google. Does this look better? This is my current version of this class from my repository. RedBlackTree
-
Is my version of this binary search tree erase() method monstrous because I'm still a noob or because it's going to be long no matter what or both?
The ordeal I have had with it makes me feel like it's full of duct tape and zip ties TBH. I am not in the know of benchmarking but using some timer class I found by googling; the run times for insertion and deletion of elements seem comparable between my raw version and the std::set. But like I indicated earlier, it is not a template class and we are only working with ints here. What I am wondering though is if an ideal erase() method is supposed really to be anywhere as long as mine turned out to be? Because seriously I felt like a dutch boy plugging holes on this thing for hours hahaha. Methods are below and entire class is available here https://github.com/sethvan/BinarySearchTreeExercise .
Heap-Layers
-
How does one learn low latency programming?
I start with Heap-Layers by the UMass Plasma group. They've even built allocators on top of this which are worth considering.
-
What are the hallmarks of well written and high quality C++ code?
Example high quality library: Heap Layers https://github.com/emeryberger/Heap-Layers
What are some alternatives?
Options - My first C Project, a console app
Hoard - The Hoard Memory Allocator: A Fast, Scalable, and Memory-efficient Malloc for Linux, Windows, and Mac.
PSRayTracing - A (modern) C++ implementation of the Peter Shirley Ray Tracing mini-books (https://raytracing.github.io). Features a clean project structure, perf. improvements (compared to the original code), multi-core rendering, and more.
memorymanager - A simple, thread-safe memory manager for 64bit C++ applications and games. Focus is on preventing heap fragmentation in the absence of good virtual memory management, at the cost of wasting some memory. It works by globally overriding the new and delete operators.
EA Standard Template Library - EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.
CppCoreGuidelines - The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++