Hello all!
I've decided to take away all the semaphores from the prime calculation program I've posted here a way back. This was only because of curiosity, because I was obvioulsy doing something wrong and I wanted to see if the program produced bad results. Well, seemingly it didn't produced bad results, but it was a lot more slower. I was not expecting that, and it seems to go against logic.
Why the program still works correctly while having multiple cogs accessing the same values? And why is it a lot more slower without semaphores than with them?
It defies logic, IMHO. I've posted the source code of both the original and the version without semaphores, for SimpleIDE.
Kind regards, Samuel Lourenço
I've decided to take away all the semaphores from the prime calculation program I've posted here a way back. This was only because of curiosity, because I was obvioulsy doing something wrong and I wanted to see if the program produced bad results. Well, seemingly it didn't produced bad results, but it was a lot more slower. I was not expecting that, and it seems to go against logic.
Why the program still works correctly while having multiple cogs accessing the same values? And why is it a lot more slower without semaphores than with them?
It defies logic, IMHO. I've posted the source code of both the original and the version without semaphores, for SimpleIDE.
Kind regards, Samuel Lourenço