diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-05-25 17:34:07 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-05-25 17:37:04 +0800 |
commit | 846d091bd25a9b3d0f6ed9c190d42027c682a045 (patch) | |
tree | 47ae5655e0aae6f95e7b87ee4f143607adfb9508 /core | |
parent | ef25b826e655f8e6a57fc7a05454bf356382bd5f (diff) | |
download | go-tangerine-846d091bd25a9b3d0f6ed9c190d42027c682a045.tar.gz go-tangerine-846d091bd25a9b3d0f6ed9c190d42027c682a045.tar.zst go-tangerine-846d091bd25a9b3d0f6ed9c190d42027c682a045.zip |
core/vm: allocate stack to 1024
Pre allocate the stack to 1024 optimising stack pushing, reducing calls
to runtime.makeslice and runtime.mallocgc
Diffstat (limited to 'core')
-rw-r--r-- | core/vm/stack.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/vm/stack.go b/core/vm/stack.go index f4777c5b3..9c10d50ad 100644 --- a/core/vm/stack.go +++ b/core/vm/stack.go @@ -29,7 +29,7 @@ type Stack struct { } func newstack() *Stack { - return &Stack{} + return &Stack{data: make([]*big.Int, 0, 1024)} } func (st *Stack) Data() []*big.Int { |