Ignore:
Timestamp:
Jun 15, 2021, 12:28:48 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b51e389c
Parents:
4aba055 (diff), 4f1b8f3f (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' into andrew-mmath, collecting updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/performance.tex

    r4aba055 r2f19e03  
    66
    77Performance has been of secondary importance for most of this project.
    8 The driving for has been to get the features working, the only performance
    9 requirements were to make sure the tests for correctness rain in a reasonable
     8Instead, the goal has been to get the features working.
     9The only performance
     10requirements is to ensure the exception tests for correctness ran in a reasonable
    1011amount of time.
    11 Still this is an implementation others could use for similar prototypes and
    12 so the results still have some use.
     12Much of the implementation is still reasonable and could be used for similar prototypes.
     13Hence,
     14the work still has some use.
     15To get a rough idea about the \CFA implementation, tests are run on \CFA, C++ and Java, which have similar termination-handling exceptions.
     16Tests are also run on \CFA and uC++, which has similar resumption-handling exceptions.
    1317
    14 \section{Test Set-Up}
    15 Tests will be run on \CFA, C++ and Java.
    16 
     18\section{Termination Comparison}
    1719C++ is the most comparable language because both it and \CFA use the same
    1820framework, libunwind.
    19 In fact the comparison is almost entirely a quality of implementation
     21In fact, the comparison is almost entirely a quality of implementation
    2022comparison. \CFA's EHM has had significantly less time to be optimized and
    2123does not generate its own assembly. It does have a slight advantage in that
    2224there are some features it does not handle.
    2325
    24 % Some languages I left out:
    25 % Python: Its a scripting language, different
    26 % uC++: Not well known and should the same results as C++, except for
    27 %   resumption which should be the same.
    28 \todo{Can we find a good language to compare resumptions in.}
     26The Java comparison is an opportunity to compare a managed memory model with unmanaged,
     27to see if there are any effects related to the exception model.
    2928
    30 All tests will be run inside a main loop which will perform the test
    31 repeatedly. This is to avoid letting and start-up or tear-down time from
     29\subsection{Test Set-Up}
     30All tests are run inside a main loop that performs the test
     31repeatedly. This design avoids start-up or tear-down time from
    3232affecting the timing results.
    33 This also means that tests cannot terminate the program, which does limit
     33A consequence is that tests cannot terminate the program, which does limit
    3434how tests can be implemented. There are catch-alls to keep unhandled
    35 exceptions from terminating the program.
     35exceptions from terminating tests.
    3636
    37 The exceptions used in this test will always be a new exception based off of
    38 the base exception. This should minimize and preformance differences based
     37The exceptions used in this test are always a new exception based off of
     38the base exception. This requirement minimizes performance differences based
    3939on the object model.
    40 Catch-alls will be done by catching the root exception type (not using \Cpp's
     40Catch-alls are done by catching the root exception type (not using \Cpp's
    4141\code{C++}{catch(...)}).
    4242
     
    4444hot.
    4545
    46 \section{Tests}
     46\subsection{Tests}
     47The following tests capture the most important aspects of exception handling and should provide
     48a reasonable guide to programmers of where EHM costs occur.
     49
    4750\paragraph{Raise/Handle}
    4851What is the basic cost to raise and handle an exception?
    4952
    50 There are a number of factors that can effect this, for \CFA this includes
     53There are a number of factors that can effect this.
     54For \CFA this includes
    5155the type of raise,
    5256
     
    6165This has the same set-up as the raise/handle test except the intermediate
    6266stack frames contain either an object declaration with a destructor or a
    63 try statement with no handlers except for a finally clause.
     67@try@ statement with no handlers except and a @finally@ clause.
    6468
    6569\paragraph{Enter/Leave}
     
    6771is thrown?
    6872
    69 This is the simplist pattern to test as it is a simple matter of entering
     73The test is a simple matter of entering
    7074and leaving a try statement.
    7175
     
    7478
    7579\paragraph{Re-throw and Conditional-Catch}
    76 How expencive it is to run a non-exception type check for a handler?
     80How expensive it is to run a non-exception type check for a handler?
    7781
    7882In this case different languages approach this problem differently, either
    7983through a re-throw or a conditional-catch.
    80 Where \CFA uses its condition other languages will have to unconditionally
     84Where \CFA uses its condition, other languages must unconditionally
    8185catch the exception then re-throw if the condition if the condition is false.
    8286
     
    8690% We could do a Cforall test without the catch all and a new default handler
    8791% that does a catch all.
    88 As a point of comparison one of the raise/handle tests (which one?) has
     92As a point of comparison, one of the raise/handle tests (which one?) has
    8993same layout but never catches anything.
    9094
     
    100104%(I haven't actually figured out how to compare this, probably using something
    101105%related to -fexceptions.)
     106
     107
     108\section{Resumption Comparison}
     109% Some languages I left out:
     110% Python: Its a scripting language, different
     111% uC++: Not well known and should the same results as C++, except for
     112%   resumption which should be the same.
     113\todo{Can we find a good language to compare resumptions in.}
Note: See TracChangeset for help on using the changeset viewer.