20,741
edits
No edit summary |
|||
| Line 25: | Line 25: | ||
* sgen: This is a GC that is specifically designed for use with the Mono runtime, which is an open-source implementation of the .NET framework. It is available under the MIT License. | * sgen: This is a GC that is specifically designed for use with the Mono runtime, which is an open-source implementation of the .NET framework. It is available under the MIT License. | ||
* libgc: This is a GC that is designed to be used as a library, and can be integrated into C and C++ programs. It is available under the BSD 3-Clause License. | * libgc: This is a GC that is designed to be used as a library, and can be integrated into C and C++ programs. It is available under the BSD 3-Clause License. | ||
=== Porting Nasal to C++ === | |||
Additionally, porting the interpreter to C++ would allow the use of standard C++ STL types, such as std::string, std::vector and std::map, to implement strings and vectors/hashes in Nasal. This would make it easier to work with these data structures, and could potentially lead to better performance and improved code readability. | Additionally, porting the interpreter to C++ would allow the use of standard C++ STL types, such as std::string, std::vector and std::map, to implement strings and vectors/hashes in Nasal. This would make it easier to work with these data structures, and could potentially lead to better performance and improved code readability. | ||
| Line 34: | Line 36: | ||
Additionally, using an existing GC allows you to take advantage of the expertise and knowledge of the GC developers, who have likely spent a great deal of time optimizing and improving the GC. This can save you a significant amount of time and effort, and can help you avoid common pitfalls and mistakes that are often made when developing a new GC. | Additionally, using an existing GC allows you to take advantage of the expertise and knowledge of the GC developers, who have likely spent a great deal of time optimizing and improving the GC. This can save you a significant amount of time and effort, and can help you avoid common pitfalls and mistakes that are often made when developing a new GC. | ||
Furthermore, porting the Nasal scripting interpreter from C to C++ -while being really straightforward to do- would allow us to get rid of the Globals struct and instead use proper OOP (i.e. one Nasal instance per object), so that it would also become trivial to use several independent instances of a Nasal interpreter at runtime, so that certain, well-behaved, scripts could indeed be running inside their own SGThread, separate from the main loop and separate from other unrelated Nasal scripts. While this would mean, that FlightGear would use more cores, it would mean that the GC overhead caused by such scripts would be moved out of the main loop. | |||
== Status == | == Status == | ||