Skip to content

Instantly share code, notes, and snippets.

View mmcloughlin's full-sized avatar

Michael McLoughlin mmcloughlin

View GitHub Profile
@mmcloughlin
mmcloughlin / README.md
Last active November 1, 2017 22:56
Mapstructure benchmark

Basic mapstructure benchmark against plain assignment.

=== RUN   TestDecodeMapStructure
--- PASS: TestDecodeMapStructure (0.00s)
=== RUN   TestDecodePlain
--- PASS: TestDecodePlain (0.00s)
goos: darwin
goarch: amd64
pkg: github.com/mmcloughlin/mapstructurebench

I have a function that I would like to provide an assembly implementation for on amd64 architecture. For the sake of discussion let's just suppose it's an Add function, but it's actually more complicated than this. I have the assembly version working but my question concerns getting the godoc to display correctly. I have a feeling this is currenty impossible, but I wanted to seek advice.

Some more details:

  • The assembly implementation of this function contains only a few

Posted as issue http://golang.org/issue/25617

What version of Go are you using (go version)?

go version go1.10.2 darwin/amd64

Does this issue reproduce with the latest release?

package main
import (
"image/color"
"log"
"os"
"github.com/mmcloughlin/geohash"
kml "github.com/twpayne/go-kml"
"github.com/twpayne/go-kml/icon"
package main
import (
"flag"
"go/build"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
package main
import (
"bufio"
"errors"
"fmt"
"io"
"log"
"os"
"regexp"
package main
import (
"flag"
"io/ioutil"
"log"
"objfile"
"os"
"path/filepath"
"regexp"
// initial commit
@mmcloughlin
mmcloughlin / globals.go
Last active January 5, 2019 22:53
Generate global versions of struct methods
package main
import (
"bytes"
"flag"
"fmt"
"go/format"
"go/types"
"log"
"os"
//build ignore
#include "textflag.h"
TEXT ·ArrayIndex3(SB),0,$0-72
MOVQ s_Array_3+32(FP), AX
MOVQ AX, ret+64(FP)
RET