3 ms·
I think not. The only limit seems to be the number of times one CPU can increment while the other is between load and store operations. If you could manipulat
by logfromblammo 12y ago
I think not. The only limit seems to be the number of times one CPU can increment while the other is between load and store operations.
If you could manipulate your two cores with enough dexterity, you could force a 2 result, but without enough fine-grained control, the practical limit is going to be determined by the number of increments that can be "wasted" by sandwiching them between the load and store operations of the other thread. You would essentially need to stop and start each CPU at four very specific operations.
The practical results show that "load + add + store + load + add + store" on one thread probably never happens during a single "add" on the other thread. You would need that to happen at least once to get below 10000. Otherwise, each increment can waste no more than one increment for the other thread, and you end up with at least 10000.
The experimental numbers are probably indicative of how long the add portion of INCL takes in relation to the whole thing.