tustvold commented on code in PR #4785:
URL: https://github.com/apache/arrow-rs/pull/4785#discussion_r1318072902


##########
arrow-json/src/reader/primitive_array.rs:
##########
@@ -57,19 +57,31 @@ primitive_parse!(i8, i16, i32, i64, u8, u16, u32, u64);
 
 impl ParseJsonNumber for f16 {
     fn parse(s: &[u8]) -> Option<Self> {
-        lexical_core::parse::<f32>(s).ok().map(f16::from_f32)
+        s.iter()
+            .map(|&b| b as char)
+            .collect::<String>()

Review Comment:
   I suspect the performance hit of this allocation will be a non-starter. This 
could be reduced by using str::from_utf8, but this will still likely regress 
performance



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to