ReturnInfinity / BareMetal-OS-legacy

BareMetal is a 64-bit OS for x86-64 based computers. The OS is written entirely in Assembly while applications can be written in Assembly, C/C++, and Rust.
1.74k stars 303 forks source link

update prime.c and primesmp.c #116

Open Kagre opened 8 years ago

Kagre commented 8 years ago

I think these updates should be ok, but I'm going to need someone with gcc to try and compile them to confirm.

ohnx commented 8 years ago

Hi there!

I'm working on compiling the program right now, but I'm having some issues :stuck_out_tongue_closed_eyes:

I'll get back to you once I can confirm - but this program does compile.

ohnx commented 8 years ago

It works, but it actually seems to be a bit slower than the current version (not sure since I just tested it by hand, I didn't actually time it).

Also, maybe you should try squashing your commits so that there aren't 10 1-line changes :smile: (@IanSeyler can also use this)

Kagre commented 8 years ago

sorry still a bit new to the community, is it still possible to squash these via the website now that i've done a pull request? or do i need to check them out again to another branch squash them via commandline and redo the request?

also note the multi-threaded version is likely to be slower overall, because the original skipped over the processes==3 step. but it seems odd to me that the updated algo runs slower since it reduces the loop count by roughly a half...