Gotcha, thanks Denis. BTW any ideia why this is way slower than the max swap function ?
That’s the algorithm I’ve tried to use Anyway, just tried swapping the values using XOR swapping but it’s slower that maxscript swap, anyway, here’s…
forget about it
Yeah, but it’s cool to try lo, the duplicates you’re having is because of your fstart and fend being sent to the threads, try this: fn runThreads =…
It’s a long story… I wanted to create a function to work with the fill and sort array functions… I tried a similar version to jonadb, but it was even …
Well, I was able to do a multithreaded very slow version… dunno why but here it goes: ( print “V7” gc() global wDone1, wDone2, fillArray, shuffl…
Well, I just did the same… I’ve distributed the filling of the array to all my 8 cores and then distributed again the randomization to 8 cores… got it…
Hehe, that’s what I’m doing also
Check this out then, I’ve re-writen my multithreaded version and now it gives the accurate time to finish the loops. ( print “V6” gc() startg = ti…
Great stuff jona, I was thinking about the same btw you can use sysInfo.cpucount to detect how many cores the cpu has. Edit: This has just blown out…
Sorry jonadb, yours still seems slower than the initial lo’s version and slower than my V5 (it’s lo’s version optimized) ( print “V1 – lo” gc() st…
Kickflipkid687: You can do multi-threaded like that!? Would this work on other intensive maxscripts, like getting alot of object positions or ver…
It does? but each thread is working on half the array… and my random is using i to 1000000 and not 1 to 1000000, so it should be ok, but I havent test…
Well, you can add more and more threads as long as you have them I just used two for showing purposes Bring it on!
No ideia why it happens, but I’ve corrected my V5 version to use a local var for the index. Btw… how about splitting the randomization in two threads…