Better Enums
Code-used-on-Daniel-Lemire-s-blog
Better Enums | Code-used-on-Daniel-Lemire-s-blog | |
---|---|---|
5 | 24 | |
1,593 | 791 | |
- | - | |
3.7 | 9.4 | |
3 months ago | 8 days ago | |
C++ | C | |
BSD 2-clause "Simplified" License | - |
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.
Better Enums
-
How to convert an enum to string in C++
I really like better_enums instead of magic_enums. There’s no limit on enum size with it: http://aantron.github.io/better-enums/
It was heavily used at a former employer of mine, so definitely a solid production-ready solution.
-
What C++ library do you wish existed but hasn’t been created yet?
IIRC I then switched to another library doing the same stuff: https://github.com/aantron/better-enums It is not as magical, as it uses a special macro to define the enum, using dedicated syntax. So it only works for enums you yourself define. However, it did work a lot better for me with enums with huge values.
-
Behind the magic of magic_enum
I can't keep up! First we have better enum, then some guy at a conference says we have to use wise enum instead, and now you speak of magic enum!
- What are some cool modern libraries you enjoy using?
-
let's all be chads
If you need a laugh today, look at Better Enums library for C++. If you thought moving from C to C++ would let you leave macros behind, think again! Enums in C++ still suck (a bit less than in C though), so someone built a library to help with that. And it's built on macros. So you can only have 64 entries per enum. And the library's code is barely readable.
Code-used-on-Daniel-Lemire-s-blog
- Estimating Your Memory Bandwidth
- First 96-Core AMD Zen 4 Threadripper Tests Show Utter Domination over Intel
-
Parsing time stamps faster with SIMD instructions
It's not bad at all https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/...
-
Under Linux, libSegFault and addr2line are underrated
A newline is missing in the example code. As given there's a segfault at line 5 not line 6.
However, the code at https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/... shows it's indeed at line 6, because it has an extra newline after the '#include '.
-
Best Websites For Coders
Daniel Lemire's Blog : Daniel Lemire's blog
-
Technical Blogs You Recommend?
Dr. Daniel Lemire's blog: https://lemire.me/blog, covers lots of technical items on optimizations in various programming languages, Lemire's work is currently in use across a number of projects and he consistently delivers fantastic improvements, he usually accompanies these improvements with a blog post describing what he did. He also occasionally posts interesting Science and Technology links on various topics not limited to tech, but health and education as well.
- suggest some c language blogs....
-
What are some cool modern libraries you enjoy using?
Nope, simdjson is originally from Daniel Lemire who also often blogs about fancy low level optimizations: https://lemire.me/blog/ I'm just a happy user :)
-
Escaping strings faster with AVX-512
Added this pull request with some interesting results.
There's a copy of the loop used on the escape function inside the avx512_escape function [0]. Is it needed or just a copy and paste mistake? (I know nothing about vector instructions)
0: https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/...
What are some alternatives?
C++ Format - A modern formatting library
FastPFor - The FastPFOR C++ library: Fast integer compression
stb - stb single-file public domain libraries for C/C++
farmhash - Automatically exported from code.google.com/p/farmhash
Klib - A standalone and lightweight C library
rust - Empowering everyone to build reliable and efficient software.
American Fuzzy Lop - american fuzzy lop - a security-oriented fuzzer
simonwillisonblog - The source code behind my blog
Cppcheck - static analysis of C/C++ code
developer-roadmap - Interactive roadmaps, guides and other educational content to help developers grow in their careers.
constexpr-8cc - Compile-time C Compiler implemented as C++14 constant expressions
cheatsheets - Cheatsheets for web development - devhints.io