You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2016/07/12 23:22:13 UTC

Converting double values to char[]

Is there any pre-existing art to convert from a numeric DocValues
field to a char[] that's re-usable?

This is for SOLR-9296. I have these "FieldWriters" that have one
instantiated for each field for the duration of the export. I'm trying
to reduce the number of Java objects, thus replacing a number of the
toString() calls with something that write to a char[] then re-use
that char[] array.

Before I launch off into ripping off the toString code fro, cay Float
and Double types....

Thanks,
Erick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Converting double values to char[]

Posted by Erick Erickson <er...@gmail.com>.
Might have cracked it, I'll know more by tomorrow....


On Tue, Jul 12, 2016 at 4:54 PM, Erick Erickson <er...@gmail.com> wrote:
> Right, thanks. I had no intention of actually committing any of this
> in, I'm just trying to figure out if this is worth the effort with a
> quick hack to take some measurements. That said I'll be more cautious
> now about making any patches.....
>
> I'll add that preliminarily, even on just looking at string fields
> it's looking promising. We can write a CharsRef without having to go
> through a String operation or hacking any code.
>
> Erick
>
> On Tue, Jul 12, 2016 at 4:31 PM, Yonik Seeley <ys...@gmail.com> wrote:
>> On Tue, Jul 12, 2016 at 7:22 PM, Erick Erickson <er...@gmail.com> wrote:
>>> Before I launch off into ripping off the toString code fro, cay Float
>>> and Double types....
>>
>> Please look into licensing before you do that...
>> Or rip off from Geronimo, which is ASL
>>
>> -Yonik
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Converting double values to char[]

Posted by Erick Erickson <er...@gmail.com>.
Right, thanks. I had no intention of actually committing any of this
in, I'm just trying to figure out if this is worth the effort with a
quick hack to take some measurements. That said I'll be more cautious
now about making any patches.....

I'll add that preliminarily, even on just looking at string fields
it's looking promising. We can write a CharsRef without having to go
through a String operation or hacking any code.

Erick

On Tue, Jul 12, 2016 at 4:31 PM, Yonik Seeley <ys...@gmail.com> wrote:
> On Tue, Jul 12, 2016 at 7:22 PM, Erick Erickson <er...@gmail.com> wrote:
>> Before I launch off into ripping off the toString code fro, cay Float
>> and Double types....
>
> Please look into licensing before you do that...
> Or rip off from Geronimo, which is ASL
>
> -Yonik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Converting double values to char[]

Posted by Yonik Seeley <ys...@gmail.com>.
On Tue, Jul 12, 2016 at 7:22 PM, Erick Erickson <er...@gmail.com> wrote:
> Before I launch off into ripping off the toString code fro, cay Float
> and Double types....

Please look into licensing before you do that...
Or rip off from Geronimo, which is ASL

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org