Jump to content

In Mono, is llGetListLength() actually 100% faster than (some_list != []) ?


primerib1
 Share

You are about to reply to a thread that has been inactive for 502 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

9 minutes ago, Quistess Alpha said:

I don't believe "elapsed time that was allotted to the script" is something we have access to, which is the problem. maybe someone could file a Jira to extend llScriptProfiler()?

I think that llGetTime() is close enough for me, unless I am missing something in the explanations above.  Like, if it is wildly inaccurate and/or inconsistent between loops/runs,etc.

Link to comment
Share on other sites

23 minutes ago, Love Zhaoying said:

I think that llGetTime() is close enough for me, unless I am missing something in the explanations above.  Like, if it is wildly inaccurate and/or inconsistent between loops/runs,etc.

It's not useless, but for the purpose of profiling a script's performance, it lacks resolution (being limited to server frames), and it's inflated on top of that because it doesn't track running time (time passes even if the scheduler doesn't run the script).

  • Like 1
Link to comment
Share on other sites

13 minutes ago, Wulfie Reanimator said:

It's not useless, but for the purpose of profiling a script's performance, it lacks resolution (being limited to server frames), and it's inflated on top of that because it doesn't track running time (time passes even if the scheduler doesn't run the script).

I'm only using it to track the script's "relative" performance - the performance of each function in the script compared to each other function, and each "atomic" action within each function, to each other "atomic" action.  Does that help with my use-case for using llGetTime() for profiling?

Link to comment
Share on other sites

1 hour ago, Love Zhaoying said:

I'm only using it to track the script's "relative" performance - the performance of each function in the script compared to each other function, and each "atomic" action within each function, to each other "atomic" action.  Does that help with my use-case for using llGetTime() for profiling?

No not really. I think the theoretically best method for relative performance testing would be to run both functions simultaneously in separate scripts, for a predefined interval of time (say, 5 seconds) and have them each report the number of repetitions. That's a bit of a hassle to set up properly though.

Link to comment
Share on other sites

53 minutes ago, Quistess Alpha said:

No not really. I think the theoretically best method for relative performance testing would be to run both functions simultaneously in separate scripts, for a predefined interval of time (say, 5 seconds) and have them each report the number of repetitions. That's a bit of a hassle to set up properly though.

You can (mis)use LSD for syncing...

Have both script wait for a certain key to actually no longer return ""

Do an iteration.

At end of iteration check if the key has returned to ""

If yes, stop & report. If not, lather rinse repeat.

5 seconds might be too short, though. Make it, say, 30 seconds.

Edited by primerib1
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 502 days.

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
 Share

×
×
  • Create New...