-
Notifications
You must be signed in to change notification settings - Fork 145
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR @shargon. This is a perfect solution to the problem.
I don't feel confident enough to approve this without proper testing. Are there any special tests you want for this PR?
We need a lot of tests! :) |
@shargon Can you briefly explain what the PR did? |
The changes aim to unify where the items are allocated, in order to simplify the counter of these items. Previously we had an expensive procedure for checking if we overpass the limits (ussually the StackItems number 2048) Now, all The problem comes with Array, Map and Struct, because they can change outside the Stack, so i removed the The reserved memory could manage different strategies, now should act as before the change. Because on |
@shargon We don't need |
Let's do it @erikzhang |
Closed in favor of #232 |
Close #202
Results in release mode:
Also we can use a better algorithm, depending the bytes and not the items. using the method
AllocateMemory
Pros:
Cons:
List
orStackItem[]
toArray
, we need to create theCompoundType
with theReservedMemory
argument.