fr Peter:
But if “0”*7 is the ‘normal’ way of doing this, it’s OK with me.
in ruby in general, the shorter and simpler, the faster.
kind regards -botp
fr Peter:
in ruby in general, the shorter and simpler, the faster.
kind regards -botp
On 5/29/06, Peña, Botp [email protected] wrote:
fr Peter:
But if “0”*7 is the ‘normal’ way of doing this, it’s OK with me.
in ruby in general, the shorter and simpler, the faster.
kind regards -botp
it might be worth profiling something like this:
lotsazeros = ‘0’ * 1000
seven_zeros = lotsazeros[0…6]
three_thousand_and_ten_zeros = lotsazeros * 3 + ‘0’ * 10
no idea how this performs, just thought it’d be worth trying…
;D
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs