FAQ
(discussion moved to golang-nuts)

It probably takes a lot more work to switch between Go context and C
context on windows.
On Wed, Mar 13, 2013 at 10:07 AM, Vova Niki wrote:
I noticed it while testing xxhash-go package (the c files are included in
the repo),
For some reason the linux is performing 2 times faster than the windows
build, the only difference is that linux is running with gcc 4.7.2 and
windows with 4.7.0 / 4.7.1.
it may be the reason so I would like somebody to check it or check why this
happens

we are looking on Benchmark_xxhash32 function, all the other functions does
not use cgo and are there just for comparison.

i7-3770K @ 3.50GHz windows 7 64bit

go version devel +7778f3df0d19 Sun Mar 10 12:50:44 2013 -0400 linux/amd64
go test bitbucket.org/StephaneBunel/xxhash-go -bench=".*"

...
Benchmark_xxhash32 50000000 57.4 ns/op
Benchmark_CRC32IEEE 10000000 162 ns/op
Benchmark_Adler32 50000000 48.7 ns/op
Benchmark_Fnv32 20000000 128 ns/op
Benchmark_MurmurHash3Hash32 1000000 1953 ns/op

go version devel +7778f3df0d19 Sun Mar 10 12:50:44 2013 -0400 windows/amd64
go test bitbucket.org/StephaneBunel/xxhash-go -bench=".*"

...
Benchmark_xxhash32 20000000 110 ns/op
Benchmark_CRC32IEEE 10000000 161 ns/op
Benchmark_Adler32 50000000 54.1 ns/op
Benchmark_Fnv32 20000000 130 ns/op
Benchmark_MurmurHash3Hash32 1000000 1954 ns/op

peterGo tests:
https://groups.google.com/d/msg/golang-nuts/pDnPzLbjJCQ/pyNjtX85iFgJ

i5-2435M @ 2.40GHz x 4

go version devel +969045163653 Sun Mar 10 18:19:53 2013 -0400 linux/amd64

gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

Benchmark_xxhash32 10000000 282 ns/op
Benchmark_goxxhash32 10000000 285 ns/op
Benchmark_CRC32IEEE 2000000 796 ns/op
Benchmark_Adler32 10000000 246 ns/op
Benchmark_Fnv32 5000000 590 ns/op
Benchmark_MurmurHash3Hash32 200000 9891 ns/op

go version devel +969045163653 Sun Mar 10 18:19:53 2013 -0400 windows/amd64

gcc (tdm64-1) 4.7.1

Benchmark_xxhash32 5000000 505 ns/op
Benchmark_goxxhash32 10000000 288 ns/op
Benchmark_CRC32IEEE 2000000 800 ns/op
Benchmark_Adler32 10000000 257 ns/op
Benchmark_Fnv32 5000000 590 ns/op
Benchmark_MurmurHash3Hash32 200000 10060 ns/op

--

---
You received this message because you are subscribed to the Google Groups
"golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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/groups/opt_out.

Search Discussions

  • Vova Niki at Mar 23, 2013 at 3:25 pm
    Can someone check if its really a windows problem and there is nothing we
    can do about it?
    should I open an issue?
    On Wednesday, March 13, 2013 1:18:16 AM UTC+2, Dave Cheney wrote:

    (discussion moved to golang-nuts)

    It probably takes a lot more work to switch between Go context and C
    context on windows.
    On Wed, Mar 13, 2013 at 10:07 AM, Vova Niki wrote:
    I noticed it while testing xxhash-go package (the c files are included in
    the repo),
    For some reason the linux is performing 2 times faster than the windows
    build, the only difference is that linux is running with gcc 4.7.2 and
    windows with 4.7.0 / 4.7.1.
    it may be the reason so I would like somebody to check it or check why this
    happens

    we are looking on Benchmark_xxhash32 function, all the other functions does
    not use cgo and are there just for comparison.

    i7-3770K @ 3.50GHz windows 7 64bit

    go version devel +7778f3df0d19 Sun Mar 10 12:50:44 2013 -0400
    linux/amd64
    go test bitbucket.org/StephaneBunel/xxhash-go -bench=".*"

    ...
    Benchmark_xxhash32 50000000 57.4 ns/op
    Benchmark_CRC32IEEE 10000000 162 ns/op
    Benchmark_Adler32 50000000 48.7 ns/op
    Benchmark_Fnv32 20000000 128 ns/op
    Benchmark_MurmurHash3Hash32 1000000 1953 ns/op

    go version devel +7778f3df0d19 Sun Mar 10 12:50:44 2013 -0400
    windows/amd64
    go test bitbucket.org/StephaneBunel/xxhash-go -bench=".*"

    ...
    Benchmark_xxhash32 20000000 110 ns/op
    Benchmark_CRC32IEEE 10000000 161 ns/op
    Benchmark_Adler32 50000000 54.1 ns/op
    Benchmark_Fnv32 20000000 130 ns/op
    Benchmark_MurmurHash3Hash32 1000000 1954 ns/op

    peterGo tests:
    https://groups.google.com/d/msg/golang-nuts/pDnPzLbjJCQ/pyNjtX85iFgJ

    i5-2435M @ 2.40GHz x 4

    go version devel +969045163653 Sun Mar 10 18:19:53 2013 -0400
    linux/amd64
    gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

    Benchmark_xxhash32 10000000 282 ns/op
    Benchmark_goxxhash32 10000000 285 ns/op
    Benchmark_CRC32IEEE 2000000 796 ns/op
    Benchmark_Adler32 10000000 246 ns/op
    Benchmark_Fnv32 5000000 590 ns/op
    Benchmark_MurmurHash3Hash32 200000 9891 ns/op

    go version devel +969045163653 Sun Mar 10 18:19:53 2013 -0400
    windows/amd64
    gcc (tdm64-1) 4.7.1

    Benchmark_xxhash32 5000000 505 ns/op
    Benchmark_goxxhash32 10000000 288 ns/op
    Benchmark_CRC32IEEE 2000000 800 ns/op
    Benchmark_Adler32 10000000 257 ns/op
    Benchmark_Fnv32 5000000 590 ns/op
    Benchmark_MurmurHash3Hash32 200000 10060 ns/op

    --

    ---
    You received this message because you are subscribed to the Google Groups
    "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-dev+...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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/groups/opt_out.
  • peterGo at Mar 23, 2013 at 6:46 pm
    Vova Niki,

    The benchmarks show that there is a Windows performance problem. File an
    issue.

    Peter
    On Saturday, March 23, 2013 11:25:21 AM UTC-4, Vova Niki wrote:

    Can someone check if its really a windows problem and there is nothing we
    can do about it?
    should I open an issue?
    On Wednesday, March 13, 2013 1:18:16 AM UTC+2, Dave Cheney wrote:

    (discussion moved to golang-nuts)

    It probably takes a lot more work to switch between Go context and C
    context on windows.
    On Wed, Mar 13, 2013 at 10:07 AM, Vova Niki wrote:
    I noticed it while testing xxhash-go package (the c files are included in
    the repo),
    For some reason the linux is performing 2 times faster than the windows
    build, the only difference is that linux is running with gcc 4.7.2 and
    windows with 4.7.0 / 4.7.1.
    it may be the reason so I would like somebody to check it or check why this
    happens

    we are looking on Benchmark_xxhash32 function, all the other functions does
    not use cgo and are there just for comparison.

    i7-3770K @ 3.50GHz windows 7 64bit

    go version devel +7778f3df0d19 Sun Mar 10 12:50:44 2013 -0400
    linux/amd64
    go test bitbucket.org/StephaneBunel/xxhash-go -bench=".*"

    ...
    Benchmark_xxhash32 50000000 57.4 ns/op
    Benchmark_CRC32IEEE 10000000 162 ns/op
    Benchmark_Adler32 50000000 48.7 ns/op
    Benchmark_Fnv32 20000000 128 ns/op
    Benchmark_MurmurHash3Hash32 1000000 1953 ns/op

    go version devel +7778f3df0d19 Sun Mar 10 12:50:44 2013 -0400
    windows/amd64
    go test bitbucket.org/StephaneBunel/xxhash-go -bench=".*"

    ...
    Benchmark_xxhash32 20000000 110 ns/op
    Benchmark_CRC32IEEE 10000000 161 ns/op
    Benchmark_Adler32 50000000 54.1 ns/op
    Benchmark_Fnv32 20000000 130 ns/op
    Benchmark_MurmurHash3Hash32 1000000 1954 ns/op

    peterGo tests:
    https://groups.google.com/d/msg/golang-nuts/pDnPzLbjJCQ/pyNjtX85iFgJ

    i5-2435M @ 2.40GHz x 4

    go version devel +969045163653 Sun Mar 10 18:19:53 2013 -0400
    linux/amd64
    gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

    Benchmark_xxhash32 10000000 282 ns/op
    Benchmark_goxxhash32 10000000 285 ns/op
    Benchmark_CRC32IEEE 2000000 796 ns/op
    Benchmark_Adler32 10000000 246 ns/op
    Benchmark_Fnv32 5000000 590 ns/op
    Benchmark_MurmurHash3Hash32 200000 9891 ns/op

    go version devel +969045163653 Sun Mar 10 18:19:53 2013 -0400
    windows/amd64
    gcc (tdm64-1) 4.7.1

    Benchmark_xxhash32 5000000 505 ns/op
    Benchmark_goxxhash32 10000000 288 ns/op
    Benchmark_CRC32IEEE 2000000 800 ns/op
    Benchmark_Adler32 10000000 257 ns/op
    Benchmark_Fnv32 5000000 590 ns/op
    Benchmark_MurmurHash3Hash32 200000 10060 ns/op

    --

    ---
    You received this message because you are subscribed to the Google Groups
    "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-dev+...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 12, '13 at 11:18p
activeMar 23, '13 at 6:46p
posts3
users3
websitegolang.org

3 users in discussion

Vova Niki: 1 post Dave Cheney: 1 post peterGo: 1 post

People

Translate

site design / logo © 2021 Grokbase