5 ms·
That’s fast. Buggy, but fast. I’m totally impressed! Especially because I researched the necessary steps to do the same thing 10 years ago based on [0]. The pat
by s-macke 11mo ago
That’s fast. Buggy, but fast. I’m totally impressed! Especially because I researched the necessary steps to do the same thing 10 years ago based on [0]. The patches required for this hack touch LLVM, libc, Linux kernel, BusyBox, ... and total approximately 15,000 lines of code.
I ran a small performance test with 'bc -lq' and compared with [0]:
scale=1000
4*a(1)
This WASM architecture compilation completely blows away my old emulation setup, which only managed around 200 MIPS. Maybe this approach can be generalized.
Running a full Linux distribution at near-native speed right in the browser would be awesome.
[0] https://github.com/s-macke/jor1k https://github.com/s-macke/jor1k
- Imustaskforhelp 11mo agoYour project was also really nice to play around with. I think it was one of the few which actually had an interesting idea including (blink), (copy.sh) I generally preferred copy.sh more to be really honest. I have actually used it sometimes as a poor man's qemu. If I may ask, what are your thoughts on copy.sh as I found that its performance on busybox or (tinycore linux with gui) was so brilliant (the only downside was that the internet speed was abysmally slow, like for me really really slow.)
- s-macke 11mo agocopy.sh has the advantage of being x86-compatible and can run many different Linux distributions. However, this CPU choice also makes it quite complex and relatively slow (not sure, if this is still correct). My own OpenRISC CPU emulation fits into just 1,500 lines of code, and I optimized every single line. To make it work, I had to compile my own Linux distribution completely from scratch. I stopped working on it about eight years ago, but I’ve completed a dozen other successful projects since then. I’m still very proud that nearly every browser-based Linux emulator, including JSLinux and copy.sh, uses my 9p-virtio- filesystem approach. It makes running complex Linux distributions in the browser much simpler. Overall, my thoughts about copy.sh’s work are entirely positive.
- Y_Y 11mo agoWhat results did your benchmark get?
- s-macke 11mo agoBy a factor of about 170. But this is more of a micro benchmark that gives you a rough idea. It's not a definitive figure.
- p0w3n3d 11mo agonice benchmark. comparing to fabrice bellard's jslinux (https://bellard.org/jslinux/ https://bellard.org/jslinux/) it's roughly 20x faster (if arm on arm) and 64x faster (if x86 on arm)