animats Posted June 21, 2019 Share Posted June 21, 2019 (edited) I doubt there's a faster way, but I'll ask anyway. Is there any way to update a single element in a list, by index, that's faster than llList2List? I know, lists are immutable and a new one has to be created for every update. I was hoping that, just perhaps, there was a built in Mono optimization for lst = llList2List(lst, [n], ix, ix); which could, if recognized by the compiler as a special case, be done very efficiently. But there's not. Making 1024 random updates to a list of 1024 integers takes 4 seconds in Animesh 1 on the beta grid and 8 seconds in my home sim. Because, of course, it's recopying the whole list for every update. Is there any trick for manipulating large arrays in LSL? (I'm trying to write an A* algorithm. Doing this in LSL is like pounding a screw.) Edited June 21, 2019 by animats Link to comment Share on other sites More sharing options...
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now