Skip to content

Non-recursive vm_loop #920

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

Closed
wants to merge 1 commit into from
Closed

Non-recursive vm_loop #920

wants to merge 1 commit into from

Conversation

zherczeg
Copy link
Member

Processing calls is removed from vm_loop which heavily improves the performance of recursive heavy benchmarks. E.g. controlflow-recursive memory consumption is reduced by 37%.

@LaszloLango LaszloLango added enhancement An improvement performance Affects performance memory consumption Affects memory consumption interpreter Related to the virtual machine labels Feb 25, 2016
@zherczeg
Copy link
Member Author

On RPi2, controlflow-recursive.js memory is reduced by 37.5%, and 3d-cube.js memory is reduced by 18.1%. Other tests are unaffected. Please check the patch.

opfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
uint8_t opcode = frame_ctx_p->byte_code_p[0];
unsigned int arguments_list_len;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use uint32_t or uint16_t instead.

@zherczeg zherczeg force-pushed the non_recursive_vm_loop branch from 2d82f4f to 74f9f49 Compare March 1, 2016 09:25
@zherczeg
Copy link
Member Author

zherczeg commented Mar 1, 2016

Patch updated.

@LaszloLango
Copy link
Contributor

LGTM

@LaszloLango LaszloLango assigned zherczeg and unassigned LaszloLango Mar 1, 2016
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
@zherczeg zherczeg force-pushed the non_recursive_vm_loop branch from 74f9f49 to e59cd95 Compare March 2, 2016 09:46
@zherczeg
Copy link
Member Author

zherczeg commented Mar 2, 2016

self LGTM

@zherczeg
Copy link
Member Author

zherczeg commented Mar 2, 2016

Landed in 1200be4

@zherczeg zherczeg closed this Mar 2, 2016
@zherczeg zherczeg deleted the non_recursive_vm_loop branch March 2, 2016 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement interpreter Related to the virtual machine memory consumption Affects memory consumption performance Affects performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants