hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] (HIVE-15743) vectorized text parsing: speed up double parse
Date Tue, 31 Jan 2017 19:09:51 GMT

    [ https://issues.apache.org/jira/browse/HIVE-15743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847333#comment-15847333
] 

Sergey Shelukhin edited comment on HIVE-15743 at 1/31/17 7:09 PM:
------------------------------------------------------------------

does there have to be a string, as well as toCharArray? The original code has bytes as input.
String creation is actually more than half of the cost of going from byte[] to double (see
picture).

Also, I am not sure how important the precision issue is; however, one thing to suggest, if
it's rare and easy to detect, is to handle the 99% cases fast, and fall back to Double.parse(new
String) in exotic/rare cases.



was (Author: sershe):
does there have to be a string, as well as toCharArray? The original code has bytes as input.
String creation is actually more than half of the cost of going from byte[] to double (see
picture).

> vectorized text parsing: speed up double parse
> ----------------------------------------------
>
>                 Key: HIVE-15743
>                 URL: https://issues.apache.org/jira/browse/HIVE-15743
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Teddy Choi
>         Attachments: HIVE-15743.1.patch, HIVE-15743.2.patch, tpch-without.png
>
>
> {noformat}
> Double.parseDouble(
>                 new String(bytes, fieldStart, fieldLength, StandardCharsets.UTF_8));{noformat}
> This takes ~25% of the query time in some cases.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message