BareMetal-OS-legacy icon indicating copy to clipboard operation
BareMetal-OS-legacy copied to clipboard

update prime.c and primesmp.c

Open Kagre opened this issue 8 years ago • 3 comments

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

Kagre avatar Jun 15 '16 23:06 Kagre

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 avatar Jun 16 '16 00:06 ohnx

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)

ohnx avatar Jun 16 '16 01:06 ohnx

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...

Kagre avatar Jun 16 '16 19:06 Kagre