File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,6 @@ int main(int argc, char *argv[]) {
122122 exit (EXIT_FAILURE);
123123 }
124124
125- std::cout << " Previous GC state: " << jl_gc_is_enabled () << std::endl;
126- jl_gc_enable (gc_option->count ());
127- std::cout << " Current GC state: " << jl_gc_is_enabled () << std::endl;
128125 // read in input events
129126 // ----------------------------------------------------------
130127 auto events = read_input_events (input_file.c_str (), maxevents);
@@ -196,8 +193,10 @@ int main(int argc, char *argv[]) {
196193 double time_lowest = 1.0e20 ;
197194 for (long trial = 0 ; trial < trials; ++trial) {
198195 std::cout << " Trial " << trial << " " ;
199- if (jl_gc_is_enabled () == 0 ) {
200- jl_gc_collect (JL_GC_FULL);
196+ if (!gc_option->count ()) {
197+ jl_gc_enable (1 ); // collect actually sweeps only with enabled gc
198+ jl_gc_collect (JL_GC_AUTO); // FULL takes longer without any visible change to timing of measured code
199+ jl_gc_enable (0 );
201200 }
202201 auto start_t = std::chrono::steady_clock::now ();
203202 for (size_t ievt = skip_events_option->value (); ievt < events.size (); ++ievt) {
You can’t perform that action at this time.
0 commit comments