Reading multiple bytes from an input adapter? #4389
TianyiChen
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
I tried a quick benchmark based on code shared at #2581 (reply in thread) , for c style
with
my implementation used
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Wow, this is impressive! Happy to see a merge request - as long as it's targeting C++11. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was looking at binary parsing performance, and noticed
get_number
is callingget()
which callsia.get_character()
and processes the input byte by byte. Since we know the length we are going to handle, I think we might get better performance if the read is done at once like callingfread
orifstream::read
for the underlying.From an old issue: #623 it mentioned
return multiple characters as a std::string.
, but I only sawget_character
from current input adapters. Wondering was it a design choice to process input byte-by-byte? Will we consider reading multiple bytes from an input adapter?Beta Was this translation helpful? Give feedback.
All reactions