Doing the math is still the best option..Benchmark: timing 100000 iterations of chop, math, regex, substr... chop: 6 wallclock secs ( 4.92 usr + 0.03 sys = 4.95 CPU) @ 202 +02.02/s (n=100000) math: 2 wallclock secs ( 1.07 usr + 0.02 sys = 1.09 CPU) @ 917 +43.12/s (n=100000) regex: 25 wallclock secs (17.40 usr + 0.32 sys = 17.72 CPU) @ 56 +43.34/s (n=100000) substr: 2 wallclock secs ( 1.99 usr + 0.03 sys = 2.02 CPU) @ 495 +04.95/s (n=100000)
In reply to Re: Re: Re: Help with decimals
by rchiav
in thread Help with decimals
by La12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |