Ignore:
Timestamp:
Jun 15, 2021, 4:17:05 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:
6071efc
Parents:
2f19e03
Message:

Revert "proofread Andrew's implement, performance and future chapters", changes saved locally.

This reverts commit b6749fdf08185c0beb48a79dbf340a15f5b3b943.

File:
1 edited

Legend:

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

    r2f19e03 rb51e389c  
    66
    77Performance has been of secondary importance for most of this project.
    8 Instead, the goal has been to get the features working.
    9 The only performance
    10 requirements is to ensure the exception tests for correctness ran in a reasonable
     8The driving for has been to get the features working, the only performance
     9requirements were to make sure the tests for correctness rain in a reasonable
    1110amount of time.
    12 Much of the implementation is still reasonable and could be used for similar prototypes.
    13 Hence,
    14 the work still has some use.
    15 To get a rough idea about the \CFA implementation, tests are run on \CFA, C++ and Java, which have similar termination-handling exceptions.
    16 Tests are also run on \CFA and uC++, which has similar resumption-handling exceptions.
     11Still this is an implementation others could use for similar prototypes and
     12so the results still have some use.
    1713
    18 \section{Termination Comparison}
     14\section{Test Set-Up}
     15Tests will be run on \CFA, C++ and Java.
     16
    1917C++ is the most comparable language because both it and \CFA use the same
    2018framework, libunwind.
    21 In fact, the comparison is almost entirely a quality of implementation
     19In fact the comparison is almost entirely a quality of implementation
    2220comparison. \CFA's EHM has had significantly less time to be optimized and
    2321does not generate its own assembly. It does have a slight advantage in that
    2422there are some features it does not handle.
    2523
    26 The Java comparison is an opportunity to compare a managed memory model with unmanaged,
    27 to see if there are any effects related to the exception model.
     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.}
    2829
    29 \subsection{Test Set-Up}
    30 All tests are run inside a main loop that performs the test
    31 repeatedly. This design avoids start-up or tear-down time from
     30All tests will be run inside a main loop which will perform the test
     31repeatedly. This is to avoid letting and start-up or tear-down time from
    3232affecting the timing results.
    33 A consequence is that tests cannot terminate the program, which does limit
     33This also means 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 tests.
     35exceptions from terminating the program.
    3636
    37 The exceptions used in this test are always a new exception based off of
    38 the base exception. This requirement minimizes performance differences based
     37The exceptions used in this test will always be a new exception based off of
     38the base exception. This should minimize and preformance differences based
    3939on the object model.
    40 Catch-alls are done by catching the root exception type (not using \Cpp's
     40Catch-alls will be done by catching the root exception type (not using \Cpp's
    4141\code{C++}{catch(...)}).
    4242
     
    4444hot.
    4545
    46 \subsection{Tests}
    47 The following tests capture the most important aspects of exception handling and should provide
    48 a reasonable guide to programmers of where EHM costs occur.
    49 
     46\section{Tests}
    5047\paragraph{Raise/Handle}
    5148What is the basic cost to raise and handle an exception?
    5249
    53 There are a number of factors that can effect this.
    54 For \CFA this includes
     50There are a number of factors that can effect this, for \CFA this includes
    5551the type of raise,
    5652
     
    6561This has the same set-up as the raise/handle test except the intermediate
    6662stack frames contain either an object declaration with a destructor or a
    67 @try@ statement with no handlers except and a @finally@ clause.
     63try statement with no handlers except for a finally clause.
    6864
    6965\paragraph{Enter/Leave}
     
    7167is thrown?
    7268
    73 The test is a simple matter of entering
     69This is the simplist pattern to test as it is a simple matter of entering
    7470and leaving a try statement.
    7571
     
    7874
    7975\paragraph{Re-throw and Conditional-Catch}
    80 How expensive it is to run a non-exception type check for a handler?
     76How expencive it is to run a non-exception type check for a handler?
    8177
    8278In this case different languages approach this problem differently, either
    8379through a re-throw or a conditional-catch.
    84 Where \CFA uses its condition, other languages must unconditionally
     80Where \CFA uses its condition other languages will have to unconditionally
    8581catch the exception then re-throw if the condition if the condition is false.
    8682
     
    9086% We could do a Cforall test without the catch all and a new default handler
    9187% that does a catch all.
    92 As a point of comparison, one of the raise/handle tests (which one?) has
     88As a point of comparison one of the raise/handle tests (which one?) has
    9389same layout but never catches anything.
    9490
     
    104100%(I haven't actually figured out how to compare this, probably using something
    105101%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.