提交 846d091b 编写于 作者: J 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
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册