Hello minux@golang.org, rsc@golang.org, remyoudompheng@gmail.com, dave@cheney.net (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to ...
10 years, 6 months ago
(2014-08-26 20:52:19 UTC)
#1
Drive by comment, I'd really like to have one vlrt.go file, mainly for artistic reasons, ...
10 years, 6 months ago
(2014-08-26 22:24:57 UTC)
#2
Drive by comment,
I'd really like to have one vlrt.go file, mainly for artistic reasons, but
minux did note he would find it useful if MIPS is added in the future.
The main difference appears to be dodiv, could you use a constant branch,
if GOARCH="arm" { slowdiv(); return } to integrate the two files ?
Thanks for having a crack at optimising this call for 386, do you have any
benchmarks? If not I can write some up ?
On 27 Aug 2014 06:52, <josharian@gmail.com> wrote:
> Reviewers: minux, rsc, remyoudompheng, dfc,
>
> Message:
> Hello minux@golang.org, rsc@golang.org, remyoudompheng@gmail.com,
> dave@cheney.net (cc: golang-codereviews@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go
>
>
> Description:
> runtime: implement 64 bit division in Go
>
> Please review this at https://codereview.appspot.com/133790043/
>
> Affected files (+244, -49 lines):
> M src/pkg/runtime/vlop_386.s
> M src/pkg/runtime/vlrt.go
> M src/pkg/runtime/vlrt_386.c
> A src/pkg/runtime/vlrt_386.go
> M src/pkg/runtime/vlrt_arm.c
> A src/pkg/runtime/vlrt_arm.go
>
>
>
> The main difference appears to be dodiv, could you use a constant branch, > ...
10 years, 6 months ago
(2014-08-26 22:45:38 UTC)
#3
> The main difference appears to be dodiv, could you use a constant branch,
> if GOARCH="arm" { slowdiv(); return } to integrate the two files ?
Happy to do that, but how should we handle the _mul64by32 and _div64by32
function prototypes? Seems ugly to put in arm stubs that do nothing / panic.
> Thanks for having a crack at optimising this call for 386, do you have any
> benchmarks? If not I can write some up ?
Actually, the main optimizing was for readability and not replacing things like
uint32(n>>32) with nhi. (The shift expression compiles down to just a register
usage.)
I'd *love* some benchmarks. Cf vlop_arm_test.go for some 32 bit benchmarks;
might be a useful starting place.
> wait for my assembly changes please I'm not sure whether the coast is clear ...
10 years, 6 months ago
(2014-08-28 23:37:27 UTC)
#5
> wait for my assembly changes please
I'm not sure whether the coast is clear yet. If not, please ignore.
* Updated to tip. No assembly changes now other than prepending runtimeĀ·.
* arm/386 delta reduced. I see no way to go further without significant 386
degradation.
* test/64bit.go covers corner cases. I'm running general randomized Go-vs-C
tests using CL 131620043 (vlrt_test.go).
* Real benchmarks are in dfc's court, but initial CPU profiling suggests no
unpleasant surprises lurk.
On 2014/08/28 23:37:27, josharian wrote: > > wait for my assembly changes please > > ...
10 years, 6 months ago
(2014-08-29 01:04:22 UTC)
#6
On 2014/08/28 23:37:27, josharian wrote:
> > wait for my assembly changes please
>
> I'm not sure whether the coast is clear yet. If not, please ignore.
>
> * Updated to tip. No assembly changes now other than prepending runtimeĀ·.
> * arm/386 delta reduced. I see no way to go further without significant 386
> degradation.
> * test/64bit.go covers corner cases. I'm running general randomized Go-vs-C
> tests using CL 131620043 (vlrt_test.go).
> * Real benchmarks are in dfc's court, but initial CPU profiling suggests no
> unpleasant surprises lurk.
I think you can move the vlrt_386.go decks into the main file. As they are not
called on arm, put some stubs in vlop_arm.s that load 0 into R0 and jump to it
to crash the process.
> I think you can move the vlrt_386.go decks into the main file. As they ...
10 years, 6 months ago
(2014-08-29 02:07:58 UTC)
#8
> I think you can move the vlrt_386.go decks into the main file. As they are not
called on arm, put some stubs in vlop_arm.s
Done. Still waiting for all.bash to complete.
> I have some benchmarks in the works. I'll try to get the posted today.
Awesome. Thanks, Dave.
>
https://codereview.appspot.com/133790043/diff/20001/src/pkg/runtime/vlrt.go#n...
> src/pkg/runtime/vlrt.go:21: func uint64div(n, d uint64) (q uint64) {
> nit: if you used a named return argument, don't also explicitly return it at
the
> bottom of the function.
Done.
LGTM https://codereview.appspot.com/133790043/diff/180001/src/pkg/runtime/vlrt_386.go File src/pkg/runtime/vlrt_386.go (right): https://codereview.appspot.com/133790043/diff/180001/src/pkg/runtime/vlrt_386.go#newcode1 src/pkg/runtime/vlrt_386.go:1: // Inferno's libkern/vlrt-arm.c I usually say the opposite, ...
10 years, 6 months ago
(2014-08-29 02:40:03 UTC)
#11
Issue 133790043: code review 133790043: runtime: implement 64 bit division in Go
(Closed)
Created 10 years, 6 months ago by josharian
Modified 10 years, 6 months ago
Reviewers:
Base URL:
Comments: 11