fast_obj
Fast C OBJ parser (by thisistherk)
dragonbox
Reference implementation of Dragonbox in C++ (by jk-jeon)
fast_obj | dragonbox | |
---|---|---|
5 | 9 | |
568 | 500 | |
- | - | |
6.2 | 9.0 | |
4 months ago | 3 days ago | |
C++ | C++ | |
MIT License | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
fast_obj
Posts with mentions or reviews of fast_obj.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-11-12.
-
Looking to port some JS stuff into C
The operations you're talking about with the example of loading 3d data is the realm of parsing, and there's a LOT of theory available and a LOT of code available for how to implement things -- there are TONS of options. Since you don't know where to start you should investigate parsing generally in C. I highly recommend you take a look at an existing library in C that loads 3d data, like this library https://github.com/thisistherk/fast_obj/blob/master/fast_obj.h that deals with OBJ the format.
-
[Part 5] Update of my Vulkan toy renderer: Meshlet cone culling, fast_obj, Vulkan dynamic rendering and many more
I've replaced tinyobjloader with fast_obj which speeds up model loading process significantly. Here is a good article comparing different obj loaders.
-
What library would be good for loading .obj vertices, normals and texture coordinates?
I wanted to say try writing your own like I did, then I remember I made it in c++ with string & stringstream std lib :(. I don't know how much would it take you to write it yourself, might try it myself. After a quick search I think this one has a pure c version: https://github.com/thisistherk/fast_obj
- How to read ascii files faster?
-
Select point on 3D mesh and find closest vertex in .obj file
Oh I see. I was talking about writing a program in the language of your choice that does this, it's not very difficult. If you use C or C++ you can load the file with https://github.com/thisistherk/fast_obj to make it even easier.
dragonbox
Posts with mentions or reviews of dragonbox.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-08-02.
-
23 years into my career, I still love PHP and JavaScript
Apparently exact minimal float-to-string conversion is more recent than I thought, and many languages used to print more (Python?) or less (PHP) decimal digits than necessary to uniquely identify the bit pattern. Python correctly prints 46000.80 + 553.04 as 46553.840000000004, but I don't know if it ever prints more digits than needed. One recent algorithm for printing floats exactly is https://github.com/ulfjack/ryu, though I'm unaware what's the state-of-the-art (https://github.com/jk-jeon/dragonbox claims to be a benchmark and the best algorithm).
- Dragonbox: Fast Float-to-String Conversion
-
C++ I wrote a simple and fast formatting library for strings
A recent update to fmt was posted to r/cpp 3 days ago (https://www.reddit.com/r/cpp/comments/vrxkt0/fmt_90_released_with_improvements_to_floating/), and since that's still fresh on people's minds, they'll wonder how yours compares; and they'll probably wonder how it compares in terms of precision, round trip-ability, and performance of DragonBox https://github.com/jk-jeon/dragonbox. By "they", I probably mean "me" :D.
-
I created something much faster than a std::string
Existing fast and correct float-to-string implementations are out there. Just use them: https://github.com/jk-jeon/dragonbox. Or maybe use your stdlib if it has good support
-
How to read ascii files faster?
Parse floats faster with dragonbox
- Dragonbox 1.1.0 is released (a fast float-to-string conversion algorithm)
-
C++20 std::format is already std::regex 2.0 situation.
Even if what you say is true, it makes little sense to not reuse it. There are other concerns here and one of them is code size. But to address the performance issue, fmtlib is doing under 50ns for most fp numbers via dragonbox(https://github.com/jk-jeon/dragonbox has the chart). So still cpu bound, but all FP output is CPU bound. At this point, what prices are we trading for faster?
-
First release of dragonbox, a fast float-to-string conversion algorithm, is available
There are some benchmarks in https://github.com/jk-jeon/dragonbox#performance. TL;DR it's faster than other state of the art algorithms like Ryu, Schubfach and variations of Grisu. We saw a nice speed up when switching from Grisu3 to Dragonbox in {fmt}: https://github.com/fmtlib/fmt/pull/1882 and it has been improved even more since then.
What are some alternatives?
When comparing fast_obj and dragonbox you can also consider the following projects:
tinyobjloader-c - Header only tiny wavefront .obj loader in pure C99
fast_float - Fast and exact implementation of the C++ from_chars functions for number types: 4x to 10x faster than strtod, part of GCC 12 and WebKit/Safari