-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Speed up startup time of REPL #11359
Conversation
And the size of |
This shows a similar speed up on ARM. (Cross compilation takes ~ an hour....) Test done on a Dual core Cortex-A9 chip (
Longest time after
|
Looks good to me. Before I hit the merge button, just so I know: how much does this add to build time? |
I'm pretty sure not more than the speed up in REPL so ~1s for x86_64. I didn't notice any difference when compiling it but I haven't measured that carefully either. I can try to get a number if you want. |
If it's a trivial difference, then there's no need. |
Thanks! |
Apparently it speeds things up by a few second as I just tested. LOL The timing of the CI should also give a sense of how much has changed (although it's even noisier)... Thanks for merging ;) |
@yuyichao Did you try this on ARM ? Can you give the cross-compilation steps you follow to build Julia ? |
The (cross-compiling) |
Oh, and my setup also requires an arm sysroot. On ArchLinux I write a wrapper around pacman to do all these. On Debian/Ubuntu it's probably easier because of multiarch. On Fedora/OpenSUSE it's probably possible but I don't really know. |
@ViralBShah In any time soon,can we expect these techniques to be added to cross-build Julia ? It would help those who are trying to build on ARM. |
I didn't bother spreading what I did for cross compilation out since it seems that other people have already done that before me and my approach is very ArcLinux specific (although there's nothing I'm doing that cannot be done on a different distro I believe). I noticed that there isn't any(?) instructions for cross compiling on a different architecture and it is probably sth that is good to have. (On the other hand, AFAIK, sth like qemu user mode is required for cross-compilation and it is very similar to any other cross compilation other than this.) |
Cross compilation is on my list of things to get to - but I would first like to get the native build working well, and get a good understanding of what all issues we have on ARM, and get to a point where we can create distributable binary installations natively. |
@vishnusuganth This was not the right place about the cross compile discussion. There is already an issue on that and we should discuss it there. |
@yuyichao Nice startup times on ARM:
|
Precompile some more functions based on what codegen is doing when REPL starts.
I've only tested on my laptop so far (see below) and the difference probably doesn't matter too much. I would like to test it on a ARMv7 system since the startup is quite slow before but the cross-compilation is really taking its time (will update later).......
So test result on
x86_64
firstempty script
Before (shortest among three runs)
After (longest among three runs)
Now REPL.
Before (shortest among three runs)
After (longest among three runs)
Edit: Sorry I was benchmarking the old version with
MARCH=x86_64
and the new version with the default arch (native
or similar?). Just measured again with both using the default arch and the result is the same.... (I guess the difference new instructions in newer architectures probably doesn't help REPL too much....)