[Glass] CharacterCollection #asNumber
Mariano Martinez Peck
marianopeck at gmail.com
Sat Dec 14 19:10:36 PST 2013
On Sat, Dec 14, 2013 at 9:34 PM, Dale K. Henrichs <
dale.henrichs at gemtalksystems.com> wrote:
> Mariano,
>
> GemStone does not have a "native asNumber" for
> CharacterCollection...however, there are primitive calls that can be 20
> times faster than asNumber, but you have to know ahead of time whether or
> not the string you pass is an Integer or a Float ... take a look at
> implementors of #fromString: ...
>
Exactly!!! I noticed exactly that...that most classes had a fromString:
which ended up in a primitive. So yes, I imagined that would be way faster.
Right now I am "guessing" the type doing some simple parser. But for some
files I do know the expected time for each column. So for those cases I
will try to use these optimized #fromString:
Thanks Dale
>
> Dale
>
> ------------------------------
>
> *From: *"Mariano Martinez Peck" <marianopeck at gmail.com>
> *To: *glass at lists.gemtalksystems.com
> *Sent: *Wednesday, December 11, 2013 2:30:22 PM
> *Subject: *[Glass] CharacterCollection #asNumber
>
>
> Hi guys,
>
> I am profiling a bit my app and it seems that CharacterCollection
> #asNumber is not that fast.
> but...first I have a question. If I browse CharacterCollection, the method
> #asNumber is under 2 categories at the same time: 'Converting' and
> '*squeak-converting'. How is that possible?
>
> Second....is there a native/optimized version of such a method?
>
> Thanks!
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131215/dcef7b65/attachment.html>
More information about the Glass
mailing list