core/vm: allocate stack to 1024

Pre allocate the stack to 1024 optimising stack pushing, reducing calls
to runtime.makeslice and runtime.mallocgc
This commit is contained in:
Jeffrey Wilcke 2017-05-25 11:34:07 +02:00
parent ef25b826e6
commit 846d091bd2
1 changed files with 1 additions and 1 deletions

View File

@ -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 {