Stop Criterion Checker

22 views
Skip to first unread message

Mark Engelberg

unread,
Aug 6, 2018, 6:49:01 PM8/6/18
to james...@googlegroups.com
I don't understand why you go to all the trouble to set up a checker on a separate thread, checking the stop criteria once per second, and then in Search's start method, you end up checking the stop criteria after every step as well. 


It seems like this call to stop criteria should be unnecessary since you are checking once per second anyway, and it would be a significant performance boost to eliminate it.

Am I missing something?

Herman De Beukelaer

unread,
Aug 7, 2018, 4:47:13 PM8/7/18
to JAMES Users
Hi Mark,

Checking the stop conditions takes very little computation time. I would be surprised if you notice a significant performance boost by not checking them after every search step. If you want, you could measure this, I am interested to see the results.

We also check stop conditions every second, because some searches have very long steps, or even only a single step (e.g. basis parallel search). For those searches, checking after every step is not sufficient, as we may need to abort the ongoing step if a termination request is received.

Does this answer your question?

Herman

Mark Engelberg

unread,
Aug 8, 2018, 10:02:08 PM8/8/18
to Herman De Beukelaer, JAMES Users
Yes, thanks.  While profiling the execution of the traveling salesman random descent example, I was seeing that a relatively large chunk of time was being spent in the stop criterion checker.  So I thought there would be a performance boost by not checking the stop criteria after each step, but I made a local copy of the jamesframework and commented out those lines, and I'm not seeing a meaningful difference in the number of steps completed in 10 seconds, although it did go away as a "hotspot" in the profiler.  Similarly, I was seeing in the profiler that a lot of time was being spent in the evaluation and validation movement cache, so I changed those .equals tests on the move to == test.  Again, it made the cache lookup disappear from the profiler listing, but I didn't see a meaningful difference in performance.  So perhaps I am being misled by the profiler.  I appreciate your explanation.

--
You received this message because you are subscribed to the Google Groups "JAMES Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to james-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/james-users/c18e6f5f-8ada-4317-a447-c61b075d392f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages