Как-то раз коллега мне сказал: "на Лиспе ты реал-тайм систему не напишешь". Ответить было нечего, да. Но Гугель указал мне на Real-time programming in Common Lisp. Качебельная копия была обнаружена в ed2k.
О чём там, собственно-то...
А там о некоей G2, которая «a real-time expert system development and delivery environment for applications in manufacturing, process control, financial trading, telecommunications, environmental monitoring, and wherever the monitoring of real-time data is required.». Документ датируется 91-ым годом, а продукт существует и по ныне.
Пишут, что основная проблема - это сборщик мусора:
«This [задержки при работе GC] is unacceptable for our realtime needs, so we have written G2 to avoid invoking the garbage collector. We accomplish this by always retaining pointers to allocated objects, by allocating recycled data structures instead of allocating new ones, by avoiding or reimplementing Common Lisp facilities that implicitly create garbage, and by using objects created with dynamic extent (defined later) where we could not avoid new object instantiations. By managing memory in this way, we never exhaust the heap, and therefore do not trigger execution of the garbage collector.»
Так-то.
Ещё расхваливают макросы:
«Highly efficient implementations of data-abstracted operations can be achieved using Common Lisp macros. In fact, Common Lisp macros make it practical to choose very complicated "multiple-case" implementations of data abstractions to handle special cases more efficiently.»
Так-то.
Выводы делаем сами. (:
Комментариев нет:
Отправить комментарий