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

Pre-allocate rpn_value stack objects #2

Open
mcspr opened this issue Sep 9, 2020 · 0 comments
Open

Pre-allocate rpn_value stack objects #2

mcspr opened this issue Sep 9, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mcspr
Copy link
Owner

mcspr commented Sep 9, 2020

Right now stack values are always created in a brand new memory location, requiring call to malloc()
(and are tracked via shared_ptr, to provide a way to detect going out of scope / simulate gc)

Perhaps, it could either:

  • pre-allocate chunk of memory to store rpn_value, avoiding malloc() calls each time, providing real 'stack'-like behaviour.
  • (slightly easier?) pre-allocate rpn_value objects and track which ones are 'free' to use
@mcspr mcspr added the enhancement New feature or request label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant