4 ms·
This shit doesn't scale: $ time ./c4 c4.c c4.c hello.c hello, world exit(0) cycle = 9 exit(0) cycle = 22614 exit(0) cycle = 9273075 real 0m0.067s
by bjornsing 12y ago
This shit doesn't scale:
$ time ./c4 c4.c c4.c hello.c
hello, world
exit(0) cycle = 9
exit(0) cycle = 22614
exit(0) cycle = 9273075
real 0m0.067s
user 0m0.067s
sys 0m0.000s
$ time ./c4 c4.c c4.c c4.c hello.c
hello, world
exit(0) cycle = 9
exit(0) cycle = 22614
exit(0) cycle = 9273075
exit(0) cycle = 933197195
real 0m5.834s
user 0m5.827s
sys 0m0.000s
$ time ./c4 c4.c c4.c c4.c c4.c hello.c
Just kidding. :) Amazingly cool! Does anybody have a smaller self-hosing compiler & bytecode vm?
- abecedarius 12y agoSelf-hosing, haha. Not that I can think of. My https://github.com/darius/ichbins https://github.com/darius/ichbins is shorter but it's a self-hosting Lisp compiling to C.
- bjornsing 12y agoFor the record: $ time ./c4 c4.c c4.c c4.c c4.c hello.c hello, world exit(0) cycle = 9 exit(0) cycle = 22614 exit(0) cycle = 9273075 exit(0) cycle = 933197195 exit(0) cycle = -1428163377 real 9m23.409s user 9m22.673s sys 0m0.020s :)