FAQ
Hi there! I'm not a member of the go team, but I have a few comments.

- This kind of communication is better suited for the golang-dev mailing
list,
which is expressly dedicated to discussions about code changes to the go
project:

https://groups.google.com/forum/#!forum/golang-dev

- The source tree is currently frozen for the 1.5 release (due to july 31,
2015). You can
submit a CL, but it probably won't be reviewed (and certainly not merged)
until
the tree re-open and the work for go 1.6 starts.

- Performance related changes are welcome, but the preferred way to show
the improvements
you made is to run some (or all) of the numerous benchmarks that come with
the source code.
You should run the benchmarks on your machine using the standard test
-bench utility, (first on
the current version of the code, then on your modified code), and the
possibly use benchcmp
(https://godoc.org/golang.org/x/tools/cmd/benchcmp) to compare the results.


Il giorno venerdì 19 giugno 2015 22:12:24 UTC+2, uttam....@intel.com ha
scritto:
Hi All,

This is "Uttam Pawar" from Server Scripting Languages Optimization team at
Intel Corporation. I would like to submit a performance improvement patch
to bytes.Compare() routine based on released branch v1.4.2. Following are
the results,

OS: Ubuntu 14.04 (64-bit)
Hardware: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Haswell)
Memory: 8 GB
Benchmark: See attached test program
#of runs: 5

Performance numbers in #of compares per second
ByteSize v1.4.2 v1.4.2+mod NewVesion/v1.4.2 (%)
1 186,137,009 213,903,419 1.15
2 185,914,178 214,287,906 1.15
4 186,358,386 214,689,604 1.15
8 200,904,721 277,427,770 1.38
16 212,911,499 250,872,896 1.18
32 197,823,085 207,567,914 1.05
64 151,062,936 158,496,972 1.05
128 105,355,013 119,346,546 1.13
256 62,156,528 81,372,483 1.31
512 29,827,371 49,435,495 1.66
1024 17,729,804 27,518,796 1.55
2048 9,910,007 14,067,308 1.42

-- To reproduce --
$ go build perftest_bytescompare.go
$ ./perftest_bytescompare 1000000000 2048 false #Compare all the bytes.
#First argument: #of times to invoke bytes.Compare() for a particular byte
size
#Second argument: Upper limit to bytes size in the form of power of 2
starting at 2^0-to-2048.
#Third argument: A boolean flag to constructs same or random byte arrays
(both input arrays are of same length)

About the code changes:
It involves little refactoring of the runtime.cmpbytes() and
runtime.cmpbody() routine in asm_amd64.s file. Major change is to inline
cmpbody() functionality into cmpbytes().

Testing:
$ ./all.bash
No regressions or failures.
ALL TESTS PASSED
For test results see attached newresults.txt file.

As a test, I tried the same patch on top of head branch as of Jun-15th
(last commit was f5d494bbdf945f2662eb4da45cdb75de2b7d43d4) with following
results,

ByteSize head head+patch h+p/head
1 201,398,274 208,764,164 1.04
2 207,949,496 209,195,083 1.01
4 204,964,589 209,238,737 1.02
8 252,162,022 291,443,417 1.16
16 258,197,961 243,784,806 0.94 <--- 6%
regression.
32 209,566,168 199,698,727 0.95 <--- 5%
regression
64 161,668,822 157,091,106 0.97 <--- 3%
regression
128 108,251,538 119,395,409 1.10
256 68,634,521 80,521,447 1.17
512 32,892,477 49,702,438 1.51
1024 19,078,607 27,152,755 1.42
2048 10,293,983 14,255,241 1.38

Testing:
$ ./all.bash
ALL TESTS PASSED

But there is a regression for the test benchmark as shown. Reason could be
that the changed/refactored code has 2 additional branches before
dispatching to 16-to-64 bytes compare (as you will see in the patch).

So my question is would this change be acceptable for the latest released
branch, and shall I submit my patch (for v1.4.2 branch) for review? I
appreciate any feedback.

Thanks,

Uttam
--
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

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 19, '15 at 8:12p
activeJun 19, '15 at 8:49p
posts2
users2
websitegolang.org

2 users in discussion

Alb Donizetti: 1 post Uttam C Pawar: 1 post

People

Translate

site design / logo © 2021 Grokbase