The Runtime Lib

A number of topics under the current dmd-runtime lib had been suggested an improvement. We'll here make a list of those suggestion so we in time can decide if it's a target for Dang to implement those improvement.

New

(Suggestion from embre) Atm, the only way to create a new class is through the garbage collector. An suggestion is to make the heap allocation inline(not use newClass[?] from runtime lib) so an optimization could be made when the class is only used in a current scope and move the allocation to the stack. Also, this would allow llvm to optimize for v-tables. Example could be that the scope keyword would do this as default(would also guarantee destructor-call on scope exit).

String switch

(Suggestion by anders0) Convert the strings in question to a perfect hast list[link?]. This would simplify the string switch runtime to make a simple hash and a memcmp.