Kameleon
@kameleon
New Member
Joined: Feb 14, 2024
Topics: 30 / Replies: 489
Reply
RE: Maxscript challenge ideas

Gotcha, thanks Denis. BTW any ideia why this is way slower than the max swap function ?

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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 =…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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 …

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

Hehe, that’s what I’m doing also

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

Kickflipkid687: You can do multi-threaded like that!? Would this work on other intensive maxscripts, like getting alot of object positions or ver…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

Well, you can add more and more threads as long as you have them I just used two for showing purposes Bring it on!

15 years ago
Forum
Reply
RE: Maxscript challenge ideas

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…

15 years ago
Forum
Page 13 / 35