~/talk

Safety first! Low-level C# without the unsafe keyword

Talkat NDC Sydney 2024 · 2024-02-12..02-16· [dotnet, c-sharp]
slides:none on file

Port converts Doom (1992) from C to modern C# without using unsafe keyword, replacing malloc/zone allocator with managed arrays and structs and keeping about 80% feature parity including rendering, input and status bar. Function pointers become delegates and lambdas for live references. Microbenchmarks show preallocated array 6.7µs and preallocated List<T> nearly as fast while dynamic resizing is much worse. Console mode uses Spectre.Console; builds run on Windows, MAUI and Avalonia and the port works and plays.

AI-written summary · about

  1. 0:00Project introduction
  2. 2:53Porting progress
  3. 5:07Understanding unsafe code
  4. 9:53Performance benchmarks
  5. 13:45Memory management techniques
  6. 20:40Arrays versus lists
  7. 26:43Binary data processing
  8. 35:14Implementing game logic
  9. 40:35Actors and thinkers
  10. 45:58Console rendering
  11. 48:15Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.