[#29911] [Bug #3231] Digest Does Not Build — Charlie Savage <redmine@...>

Bug #3231: Digest Does Not Build

19 messages 2010/05/01

[#29920] [Feature #3232] Loops (while/until) should return last statement value if any, like if/unless — Benoit Daloze <redmine@...>

Feature #3232: Loops (while/until) should return last statement value if any, like if/unless

9 messages 2010/05/01

[#29997] years in Time.utc — Xavier Noria <fxn@...>

Does anyone have a precise statement about the years supported by

13 messages 2010/05/04

[#30010] [Bug #3248] extension 'tk' is finding tclConfig.sh and tkConfig.sh incorrectly — Luis Lavena <redmine@...>

Bug #3248: extension 'tk' is finding tclConfig.sh and tkConfig.sh incorrectly

9 messages 2010/05/05

[#30226] [Bug #3288] Segmentation fault - activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88 — Szymon Jeż <redmine@...>

Bug #3288: Segmentation fault - activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88

10 messages 2010/05/13

[#30358] tk doesn't startup well in doze — Roger Pack <rogerdpack2@...>

Currently with 1.9.x and tk 8.5,the following occurs

12 messages 2010/05/22

[ruby-core:30186] Re: [Bug #3273] Float string conversion

From: Rick DeNatale <rick.denatale@...>
Date: 2010-05-12 14:41:56 UTC
List: ruby-core #30186
On Tue, May 11, 2010 at 5:44 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> Hi,
>
> In message "Re: [ruby-core:30165] [Bug #3273] Float string conversion"
> n Wed, 12 May 2010 02:51:37 +0900, Kurt Stephens <redmine@ruby-lang.org> writes:
>
> |Should Float#to_s cache its result since Floats are immutable values and the Float#to_s is fairly complex/expensive?
>
> First, Maybe. it should. ut it's not a bug at least. ove to
> feature-request. econd, we need to prove the effectiveness of the
> caching in real-world use-case (is it really a bottleneck?), before
> sacrifying space efficiency.

I'm not even sure how this would work.

Although floats ARE immutable they aren't interned, so it's unlikely
that two computed float values which are equal will be the same
object, so cacheing to_s for an instance of Float isn't likely to gain
much.  Caching through some kind of hash would seem to be the only
other option, and that may be on the same order of performance as just
recomputing the string, not sure just a guess.  It would also hamper
GC by keeping references, to the strings and float keys.

I'd also guess that this if this IS a problem it's only a problem for
a small class of applications, and would  be better addressed by those
applications.

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

In This Thread

Prev Next