chewxy / math32

A float32 version of Go's math package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abs fix

chewxy opened this issue · comments

@dgryski [10:49 AM]
@chewxy You can probably fix this one https://github.com/chewxy/math32/blob/master/abs.go#L8 to do the same as the stdlib abs
(I'm sure Abs shows up in your profiles all the time...)
@chewxy [10:50 AM]
the commented out codes were the original
at the time I wrote the package the if-else version outperforms the << versions
but that was like Go 1.5
@dgryski [10:51 AM]
Yes. There was a compiler issue that's fixed now and it properly gets inlined into a few instructions

Fixed by #3