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

roseus is almost 30x slower than irteusgl when testing transparent.l #728

Open
Affonso-Gui opened this issue Nov 10, 2022 · 0 comments
Open

Comments

@Affonso-Gui
Copy link
Member

When testing https://github.com/euslisp/jskeus/blob/master/irteus/test/transparent.l with the current opt version:

$ time irteusgl transparent.l
real    0m49.797s
user    0m44.197s
sys     0m2.729s

$ time roseus transparent.l
real    24m4.576s
user    23m54.317s
sys     0m4.024s

This is due to having the misfortune of landing in a situation in which there is not enough heap memory available, so the gc runs many unnecessary times.

;; irteusgl
0 gc:(2981970 7902582), vmrss:126252(86324), gctimes:71
1 gc:(2981970 7902582), vmrss:130440(86324), gctimes:78
2 gc:(2981970 7902582), vmrss:130440(86324), gctimes:85
3 gc:(2981970 7902582), vmrss:130464(86324), gctimes:92

;; roseus
0 gc:(936039 6134703), vmrss:131620(105268), gctimes:346
1 gc:(936039 6134703), vmrss:135944(105268), gctimes:633
2 gc:(936039 6134703), vmrss:135944(105268), gctimes:920

Usually the heap memory is resized to totalheap * gcmargin to avoid this issue. However, in this case it happens that enough memory is allocated in the first gc attempt, so the heap is never resized.
https://github.com/euslisp/EusLisp/blob/master/lisp/c/memory.c#L287-L293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant