Fixed. Cheers.

On Sunday, August 6, 2017 at 12:23:57 PM UTC+10, Michael Jones wrote:
>
> Great. Hope it helps. I had a typo in power 0 (which is never called. 
> Change the return to 1.0.
>
> On Sat, Aug 5, 2017 at 6:50 PM <ped...@cpmech.com <javascript:>> wrote:
>
>> Thanks, Michael.
>>
>> I've created a tiny project with those files here: 
>> https://github.com/cpmech/go-fast-math-experiments
>>
>> The output of go test -run=XXX -bench=. -benchtime=10s (in the xmath 
>> package) is:
>> BenchmarkPowStd-32       300000000        49.8 ns/op
>> BenchmarkPowP-32         2000000000         8.85 ns/op
>> BenchmarkPowFI-32         2000000000         6.31 ns/op
>> BenchmarkPowStd10-32     100000000       237 ns/op
>> BenchmarkPowP10-32       500000000        39.1 ns/op
>> BenchmarkPowFI10-32       300000000        44.6 ns/op
>> BenchmarkPowStd20-32     30000000       549 ns/op
>> BenchmarkPowP20-32       200000000        97.4 ns/op
>> BenchmarkPowFI20-32       200000000        93.8 ns/op
>> BenchmarkPowStd50-32     10000000      1584 ns/op
>> BenchmarkPowP50-32       50000000       304 ns/op
>> BenchmarkPowFI50-32       50000000       249 ns/op
>> BenchmarkPowStd100-32     5000000      3529 ns/op
>> BenchmarkPowP100-32       20000000       692 ns/op
>> BenchmarkPowFI100-32     30000000       522 ns/op
>> BenchmarkPowStd200-32     2000000      9221 ns/op
>> BenchmarkPowP200-32       10000000      1623 ns/op
>> BenchmarkPowFI200-32     20000000      1124 ns/op
>>
>> Your table-based function (PowFI) wins overall with ~7x speedup vs mine 
>> (PowP) with ~5x speedup (compared to the std math which is 
>> non-integer-specific, so, not very fair... but OK as reference).
>>
>> Cheers.
>> Dorival
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> Michael T. Jones
> michae...@gmail.com <javascript:>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to