Ignore:
Timestamp:
Jul 7, 2021, 6:24:42 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d83b266
Parents:
1f45c7d (diff), b1a2c4a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/ThrowFinally.java

    r1f45c7d rc86ee4c  
    1313        }
    1414
     15        private static long loop(int times, int total_frames) {
     16                long startTime = System.nanoTime();
     17                for (int count = 0 ; count < times ; ++count) {
     18                        try {
     19                                unwind_finally(total_frames);
     20                        } catch (EmptyException e) {
     21                                // ...
     22                        }
     23                }
     24                long endTime = System.nanoTime();
     25                return endTime - startTime;
     26        }
     27
    1528        public static void main(String[] args) {
    1629                int times = 1;
     
    2336                }
    2437
    25                 for (int count = 0 ; count < times ; ++count) {
    26                         try {
    27                                 unwind_finally(total_frames);
    28                         } catch (EmptyException e) {
    29                                 // ...
    30                         }
    31                 }
     38                // Warm-Up:
     39                loop(1000, total_frames);
     40
     41                long time = loop(times, total_frames);
     42                System.out.println("Run-Time (ns): " + time);
    3243        }
    3344}
Note: See TracChangeset for help on using the changeset viewer.