-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fast number parsing #965
Comments
That code is GPL3'd. |
Thanks a lot. This seems to be very close to the |
Ah nice :-), Ehm -> |
If you even really looked at GPL3 code and based the code on it's design, then your code basically needs to be GPL3 as well, it is an extremely viral license. Also, as a side note, I've not seen any faster than the one in the Boost.Spirit2/3 library. ^.^ |
But as an author: I can change the licence at any time I want to another one, or is this prohibited? |
If your code is 'based on' GPL3 code, even if you typed every character yourself, it, sadly, is still GPL3... The C++ standard library conversions are so slow because of so much memory work they do. The C functions are so slow compared to Boost.Spirit because they have to handle locale and other such annoyances. Boost.Spirit on the other hand makes specialized templates for the precise code of what you precisely want to parse in whatever base you want, which is why it is so fast. If any library is determined to be faster the Boost.Spirit dev's fix up theirs to either match or beat it. The nice things of template metaprogramming. :-) Plus with Boost.Spirit you could parse all of a JSON document super-fast into about any container you want. There is a simple/readable JSON parser made in Boost.Spirit on github somewhere, though it just parses into whatever you want, it doesn't have a nice and easy access thing in all ways like this library does. |
We will not add a Boost dependency to this library. If there is a drop-in replacement for our current conversion with an MIT-compatible license and that is measured to be faster, I am happy to have a look. |
Oh I never suggested doing so! Boost.Spirit can be used standalone without boost as well, but even then it follows the boost license so you can easily pick parts out of it, like number parsing, as necessary, no GPL issues. :-) |
Interesting conversation: that basically means. I can make the whole project another license because of this invasively gpl just in order to use a snippet out of it. how stupid :). thanks for the clarification :).
Von meinem iPhone gesendet
… Am 09.02.2018 um 17:15 schrieb OvermindDL1 ***@***.***>:
But as an author: I can change the licence at any time I want to another one, or is this prohibited?
If your code is 'based on' GPL3 code, even if you typed every character yourself, it, sadly, is still GPL3...
The C++ standard library conversions are so slow because of so much memory work they do. The C functions are so slow compared to Boost.Spirit because they have to handle locale and other such annoyances. Boost.Spirit on the other hand makes specialized templates for the precise code of what you precisely want to parse in whatever base you want, which is why it is so fast. If any library is determined to be faster the Boost.Spirit dev's fix up theirs to either match or beat it. The nice things of template metaprogramming. :-)
Plus with Boost.Spirit you could parse all of a JSON document super-fast into about any container you want. There is a simple/readable JSON parser made in Boost.Spirit on github somewhere, though it just parses into whatever you want, it doesn't have a nice and easy access thing in all ways like this library does.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah that's the GPL for you. The second I see anything as GPL (or a few minor others) I immediately write it off and pretend it does not exist... ^.^; |
I once optimized a string conversion from string2double/float and integral type:
It turned out to beat anything I've seen so far (except probably some geeky-assembler optimized code):
Here the GIST:
https://gist.github.com/gabyx/cd8ea9e727f5683a1fc654020edb6951
taken from here:
https://github.com/gabyx/GRSFramework/blob/5f1e8dca647d45d2f3b85e4a440b0f1195470b45/common/include/GRSF/common/FastStringConversion.hpp#L28
maybe it is of any help here, if it is faster ;-). It could serve as a drop-in replacement. This is tested, and was used years ago. It should be safe =)
The text was updated successfully, but these errors were encountered: