Changeset 98da9e8
- Timestamp:
- Mar 22, 2026, 9:31:28 PM (9 hours ago)
- Branches:
- master
- Parents:
- 8d764d4f
- File:
-
- 1 edited
-
doc/theses/mike_brooks_MMath/conclusion.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mike_brooks_MMath/conclusion.tex
r8d764d4f r98da9e8 6 6 Accomplishing this goal in C is difficult because these features are poorly designed. 7 7 In contrast, \CFA's advanced type system and language features plus my critical design choices made it possible to provide better support with significant safety. 8 The result is application code that is easier to write, understand, maintain, and safer from hacker attach-vectors. 8 The result is application code that is easier to write, understand, maintain, and significantly safer from hacker attach-vectors. 9 Finally, the performance sections for each container demonstrated that safety does not have to reduce performance, \ie rolling-your-own container is now an excuse not a reason. 9 10 10 \section{Lists}11 12 The key takeaway for lists is that intrusive lists can be made easy to use, performant by eliminating implicit memory allocation, and able to simulate wrapped lists, whereas wrapped lists cannot simulate intrusive lists.13 11 14 12 \section{Arrays} … … 18 16 Array overruns are no longer possible because all subscripting is checked, as in other modern languages. 19 17 Subscript checking can be implicitly elided when the compiler is given sufficient information to determine the subscript variable is always in bounds, giving performant execution. 18 Indirectly, simple and complex VLA's reduce heap allocation resulting in better performance (up to an order of magnitude in comparisons with @std::vector@) and no contention in concurrent programs. 19 Any reduction of dynamic allocation is always a safety benefit. 20 Finally, language subarray slicing of higher-dimensional arrays is also a powerful and safety critical feature versus programmers attempting it themselves. 20 21 21 Safe, complex VLA's is another important feature because it replaces unsafe explicit dynamic allocation.22 As well, VLA's reduce heap contention in concurrent programs.23 22 24 Finally, the ability to slice a higher-dimensional array into subarrays is also a powerful and safety critical feature. 23 \section{Lists} 24 25 The key takeaway for lists is that intrusive lists can be made easy to use, performant by eliminating implicit memory allocation, and able to simulate wrapped lists, whereas wrapped lists cannot simulate intrusive lists. 26 As well, the \CFA list-API eliminates many frustrating and error-prone requirements with \CC STL lists, \eg, a node can be returned and removed in a single operation (no 2-step @front@/@pop@), and an arbitrary node can be added/removed without the need for an iterator. 27 As for \CC, the \CFA list API is powerful enough to reduce almost all common C list errors, substantially increasing program safety. 25 28 26 29 27 30 \section{Strings} 28 31 29 The key takeaway for strings is that providing powerful and safe block operations for manipulating strings is more important than ultra-level performance.32 The key takeaway for strings is that providing powerful and safe block-operations for manipulating strings is more important than ultra-level performance. 30 33 Manipulating strings is always going to be expensive because of their dynamic variable sizing, as the hardware rarely has string-level operations, possibly only move and compare. 31 This work designs an expressive set of safe string operations for composing, comparing, and decomposing arbitrary length strings, include complex reading and printing operations. 32 33 Creating bespoke storage management for strings has the advantage of faster, more compact storage management due to string sharing, at the cost of additional external fragmentation between the string and general heaps. 34 The new \CFA string API is a very expressive set of safe string operations for composing, comparing, and decomposing arbitrary length strings, include complex reading and printing operations. 35 All low-level mechanisms for working with string, in any programming language, are error-prone in correctness and safety (back to working with arrays). 36 Providing string lengths is also a significant safety improvement, while still working with compiler null-terminate string constants (as for \CC). 37 As well, overloading C string operations to work with \CFA strings provides a safe vector for updating existing C programs manipulating strings. 38 Finally, creating bespoke storage management for strings has the advantage of faster, more compact storage management due to string sharing, at the cost of additional external fragmentation between the string and general heap. 34 39 With the large amounts of available memory, this approach is a viable tradeoff. 35 36 40 37 41 … … 40 44 All three forms of containers presented in this work are in their nascence, both in design and implementation. 41 45 This work provides the foundation for future \CFA students to add more functionality along with robust and performant implementations. 42 46 Completing the syntax change from @array@ to C-style for dimensions and subscripts is possibly the most important first step to fit with C-programmer expectation resulting in faster adoption. 47 Also, adding a panoply of additional intrusive lists, \eg stack, queue, dequeue, \etc, is needed to complement the @list@ structure. 48 I left all the infrastructure to accomplish these task, they just need time to complete.
Note:
See TracChangeset
for help on using the changeset viewer.