Closed Habush closed 4 years ago
I don't know what's wrong with par-map
I noticed that it misbehaves with the atomspace, many years ago. There's no data corruption, so it "works" -- its just the 2 threads only work 1.5x faster, and 3 threads are the same speed as one thread, and and four threads are slower than one thread. I have not been able to track down what it is, and I think that it's something deep inside of guile itself, and not something in the atomspace.
FYI @Habush I thought a bit more about the par-map problem, and the only thing I could think of was that removing most mutexes from the atomspace could help. To that end, I propose https://github.com/opencog/atomspace/issues/2553 as the way to do this. I don't have time to do this myself, but maybe you could get this placed onto someone else's priority list, and they could get it done? I would consult and hold-hands for the task. Its not an easy task, but its also not a hard one.
This fixes #198 and as @linas noted in #161
par-map
introduces its own set of problems including #198 , which I suspect it has to do with the lack of locks inmake-atom-set
function (but I am only running two threads and one thread doesn't access the atom cache!). Hence getting rid ofpar-map
and replacing it with other threading libraries (like on suggested in #197) maybe a good approach.