go-pulse/accounts/abi
Felix Lange 5f7826270c all: unify big.Int zero checks, use common/math in more places (#3716)
* common/math: optimize PaddedBigBytes, use it more

name              old time/op    new time/op    delta
PaddedBigBytes-8    71.1ns ± 5%    46.1ns ± 1%  -35.15%  (p=0.000 n=20+19)

name              old alloc/op   new alloc/op   delta
PaddedBigBytes-8     48.0B ± 0%     32.0B ± 0%  -33.33%  (p=0.000 n=20+20)

* all: unify big.Int zero checks

Various checks were in use. This commit replaces them all with Int.Sign,
which is cheaper and less code.

eg templates:

    func before(x *big.Int) bool { return x.BitLen() == 0 }
    func after(x *big.Int) bool  { return x.Sign() == 0 }

    func before(x *big.Int) bool { return x.BitLen() > 0 }
    func after(x *big.Int) bool  { return x.Sign() != 0 }

    func before(x *big.Int) int { return x.Cmp(common.Big0) }
    func after(x *big.Int) int  { return x.Sign() }

* common/math, crypto/secp256k1: make ReadBits public in package math
2017-02-28 15:09:11 +01:00
..
bind all: unify big.Int zero checks, use common/math in more places (#3716) 2017-02-28 15:09:11 +01:00
abi_test.go accounts/abi: added testcase to unpack []uint32 2017-01-09 11:36:32 +02:00
abi.go common: move big integer math to common/math (#3699) 2017-02-26 22:21:51 +01:00
argument.go core/vm: move Log to core/types 2017-01-06 14:15:22 +01:00
doc.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
error.go accounts/abi: fixed string and fixed size bytes packing 2016-04-28 12:41:47 +02:00
event_test.go all: update license information 2016-04-15 09:48:05 +02:00
event.go accounts/abi: add support for "anonymous" and "indexed" for events (#3464) 2016-12-22 01:51:20 +01:00
method.go accounts/abi: Negative numbers not properly converted in ABI encoding 2016-06-06 14:27:15 +02:00
numbers_test.go accounts/abi: fix uint64 upper range encoding. 2016-06-10 12:32:08 +03:00
numbers.go all: unify big.Int zero checks, use common/math in more places (#3716) 2017-02-28 15:09:11 +01:00
packing.go all: unify big.Int zero checks, use common/math in more places (#3716) 2017-02-28 15:09:11 +01:00
reflect.go accounts/abi: differentiate between static and dynamic arrays (#3121) 2016-11-03 23:25:19 +01:00
type_test.go accounts/abi, internal/jsre/deps: gofmt -w -s (#3636) 2017-02-03 13:32:04 +01:00
type.go accounts/abi: fix comment spelling error 2017-01-13 11:14:47 +02:00