Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some VM optimizations #2128

Merged
merged 7 commits into from
Aug 13, 2021
Merged

Some VM optimizations #2128

merged 7 commits into from
Aug 13, 2021

Commits on Aug 12, 2021

  1. stackitem: use Bool item directly

    It is always copied.
    
    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    cff8b1c View commit details
    Browse the repository at this point in the history
  2. stackitem: make BigInteger alias to big.Int

    Remove one indirection step.
    ``
    name       old time/op    new time/op    delta
    MakeInt-8    79.7ns ± 8%    56.2ns ± 8%  -29.44%  (p=0.000 n=10 10)
    
    name       old alloc/op   new alloc/op   delta
    MakeInt-8     48.0B ± 0%     40.0B ± 0%  -16.67%  (p=0.000 n=10 10)
    
    name       old allocs/op  new allocs/op  delta
    MakeInt-8      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.000 n=10 10)
    ```
    
    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    a5516e8 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2021

  1. vm: do not copy parameter

    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    f5d1277 View commit details
    Browse the repository at this point in the history
  2. compiler: use parameter directly in writeJumps

    `Next` doesn't longer copy parameter.
    
    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    dc9287b View commit details
    Browse the repository at this point in the history
  3. vm: embed reference counter in compound items

    ```
    name              old time/op  new time/op  delta
    RefCounter_Add-8  44.8ns ± 4%  11.7ns ± 3%  -73.94%  (p=0.000 n=10 10)
    ```
    
    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    4f98ec2 View commit details
    Browse the repository at this point in the history
  4. stackitem: make ByteArray an alias to []byte

    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    1dfef4b View commit details
    Browse the repository at this point in the history
  5. stackitem: make Buffer an alias to []byte

    Signed-off-by: Evgeniy Stratonikov <[email protected]>
    fyrchik committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    6879f76 View commit details
    Browse the repository at this point in the history