FAQ

On Tuesday, 26 August 2014 08:27:34 UTC+10, Stephen Gutekanst wrote:
Hi all, a few questions for those of you experienced enough with the Go
toolchain:

- I am writing very small SIMD assembly functions, like Vec32Add,
Vec64Add, etc.
- There was talk somewhere about a potential change allowing assembly
functions to be inlined by the compiler to avoid the overhead of a function
call, what ever came of this?

It is still something that we'd like to see, there are no plans at the
moment do to it as the current inlining scheme works at the source code
level, not the binary level.

-
- I can use the CPUID instruction to test whether or not an amd64 CPU
supports AVX instructions (like this
<https://gist.github.com/slimsag/294e1a93d3d0f920939f>) -- and I know
that all (except one?) amd64 CPU's support SSE2 instructions. But how can I
choose the right code path efficiently? I could do an if statement but it
doesn't seem optimal given that these are such small functions.

You can either do a test and set a function variable which you branch
through at startup, we do this for the runtime map implementation, look at
runtime/hashmap_fast.(go,c) or compile two versions of your program using
build tags.

- Any plans to add vector/SIMD instructions to 6a ? (e.g. vmovupd,
vaddpd, etc) I can lay them down using the BYTE pseudo-op but it seems like
something that the assembler should eventually have anyway?

Please open an issue on the issue tracker specifying the exact
instructions you want added


Thank you,
Stephen
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 8 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 25, '14 at 10:27p
activeAug 30, '14 at 11:39a
posts8
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase