This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Improve istream extractors for floating point types


While working on I/O for std::decimal types (which I'm not going to
complete for gcc 8) I realised that std::num_get still uses the old
COW std::string for reading floating point types, which always
allocates memory.

With this patch (which is missing the fixes for the linker script to
give the new symbols the right version) we use the new std::string, so
if the value being read from the stream is shorter than 16 bytes we
don't need to allocate, and so can read much faster.

I think this is worth changing, but I need to do some more ABI
verification (and fix the linker script).


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]