[ 
https://issues.apache.org/jira/browse/THRIFT-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924791#action_12924791
 ] 

Bryan Duxbury commented on THRIFT-964:
--------------------------------------

If it's just the memory size you're looking to improve on, then I might support 
adding a type annotation that allowed a given double field to be represented in 
memory as a float. However, you'd still need to decode it as a double then 
truncate it into the float. This will probably take extra time, but it will 
save you the bytes. That is, unless you're in a 64-bit JVM... I'm not sure how 
much memory a float field takes in a class as compared to a double. It probably 
depends greatly on the other fields.

> Support for single precision floating point numbers
> ---------------------------------------------------
>
>                 Key: THRIFT-964
>                 URL: https://issues.apache.org/jira/browse/THRIFT-964
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Compiler (General)
>            Reporter: Arvind Jayaprakash
>
> We have an application that uses "float", the IEEE single precision numbers. 
> The reasons are the two obvious ones: the lack of need for precision as high 
> as "double" and data size given that we have millions of such numbers.
> I'd like to see support for this data format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to