- Timestamp:
- Jun 16, 2021, 2:30:32 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 5a4f1a8
- Parents:
- edebbf7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/performance.tex
redebbf7 r029cbc0 4 4 \textbf{Just because of the stage of testing there are design notes for 5 5 the tests as well as commentary on them.} 6 \todo{Revisit organization of the performance chapter once tests are chosen.} 7 % What are good tests for resumption? 6 8 7 9 Performance has been of secondary importance for most of this project. 8 The driving for has been to get the features working, the only performance9 requirements were to make sure the tests for correctness rain in a reasonable10 Instead, the focus has been to get the features working. The only performance 11 requirements is to ensure the tests for correctness run in a reasonable 10 12 amount of time. 11 Still this is an implementation others could use for similar prototypes and12 so the results still have some use.13 13 14 %\section{Termination Comparison} 14 15 \section{Test Set-Up} 15 16 Tests will be run on \CFA, C++ and Java. … … 17 18 C++ is the most comparable language because both it and \CFA use the same 18 19 framework, libunwind. 19 In fact the comparison is almost entirely a quality of implementation20 In fact, the comparison is almost entirely a quality of implementation 20 21 comparison. \CFA's EHM has had significantly less time to be optimized and 21 22 does not generate its own assembly. It does have a slight advantage in that 22 23 there are some features it does not handle. 23 24 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.} 25 Java is another very popular language with similar termination semantics. 26 It is implemented in a very different environment, a virtual machine with 27 garbage collection. 28 It also implements the finally clause on try blocks allowing for a direct 29 feature-to-feature comparison. 29 30 30 All tests will be run inside a main loop which will perform the test31 repeatedly. This is to avoid letting andstart-up or tear-down time from31 All tests are run inside a main loop which will perform the test 32 repeatedly. This is to avoids start-up or tear-down time from 32 33 affecting the timing results. 33 This also means that tests cannot terminate the program, which does limit 34 how tests can be implemented. There are catch-alls to keep unhandled 35 exceptions from terminating the program. 34 A consequence of this is that tests cannot terminate the program, 35 which does limit how tests can be implemented. 36 There are catch-alls to keep unhandled 37 exceptions from terminating tests. 36 38 37 The exceptions used in th is test will always be a newexception based off of38 the base exception. This should minimize and preformance differences based39 The exceptions used in these tests will always be a exception based off of 40 the base exception. This requirement minimizes performance differences based 39 41 on the object model. 40 Catch-alls will be done by catching the root exception type (not using \Cpp's42 Catch-alls are done by catching the root exception type (not using \Cpp's 41 43 \code{C++}{catch(...)}). 42 44 … … 45 47 46 48 \section{Tests} 49 The following tests were selected to test the performance of different 50 components of the exception system. 51 The should provide a guide as to where the EHM's costs can be found. 52 47 53 \paragraph{Raise/Handle} 48 54 What is the basic cost to raise and handle an exception? 49 55 50 There are a number of factors that can effect this , for \CFA this includes51 the type of raise,56 There are a number of factors that can effect this. 57 For \CFA this includes the type of raise, 52 58 53 59 Main loop, pass through a catch-all, call through some empty helper functions … … 67 73 is thrown? 68 74 69 This is the simplist pattern to test as it is a simple matterof entering75 This test is a simple pattern of entering 70 76 and leaving a try statement. 71 77 … … 74 80 75 81 \paragraph{Re-throw and Conditional-Catch} 76 How expen cive it is to run a non-exception type check for a handler?82 How expensive it is to run a non-exception type check for a handler? 77 83 78 84 In this case different languages approach this problem differently, either … … 100 106 %(I haven't actually figured out how to compare this, probably using something 101 107 %related to -fexceptions.) 108 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 114 %\section{Resumption Comparison} 115 \todo{Can we find a good language to compare resumptions in.}
Note: See TracChangeset
for help on using the changeset viewer.