Re: [go-nuts] Modifying go toolchain to have an empty IAT for windows amd64

2024-10-19 Thread Ian Lance Taylor
On Sat, Oct 19, 2024 at 8:11 PM rudeus greyrat wrote: > > I want to have an empty IAT when I compile go exe. Why do you want that? > I noticed that all the imports in the IAT are because of a file in go runtime > package called > https://github.com/golang/go/blob/master/src/runtime/os_windows

[go-nuts] Modifying go toolchain to have an empty IAT for windows amd64

2024-10-19 Thread rudeus greyrat
The post I made on Reddit after someone recommended I post here: https://www.reddit.com/r/golang/comments/1g7elz5/modifying_go_toolchain_to_have_an_empty_iat_for/ Goal I want to have an empty IAT when I compile go exe. I posted about this in the past https://www.reddit.com/r/golang/comments/1f

Re: [go-nuts] math.Abs vs if value < 0

2024-10-19 Thread 'Axel Wagner' via golang-nuts
It gives a different result for -0: https://go.dev/play/p/LAVIaAZsVNi Also, the math.Abs implementation is branch-less. Depending on what the compiler makes of either, that might perform better. On Sat, 19 Oct 2024 at 16:28, Diego Augusto Molina < diegoaugustomol...@gmail.com> wrote: > Hi! I want

[go-nuts] math.Abs vs if value < 0

2024-10-19 Thread Diego Augusto Molina
Hi! I wanted to ask what is the difference between the current implementation of math.Abs and the following: ```go func Abs(x float64) float64 { if x < 0 { return -x } return x } ``` math.Abs would appear to return a copy of the input with the sign bit set to zero. I tried the