Commit 846d091b authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

core/vm: allocate stack to 1024

Pre allocate the stack to 1024 optimising stack pushing, reducing calls
to runtime.makeslice and runtime.mallocgc
parent ef25b826
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment