是IronScheme跨preTED或编译的?它与.NET框架的优化中获益?它与、框架、IronScheme、preTED

2023-09-04 01:21:24 作者:梦要自己扛

在这本书的IronPython的行动中,的作者指出IronPython的,不像CPython的,从一定的优化,​​无论是在JIT和框架本身,那CPython中不能利用的好处。因此,IronPython的潜在速度比CPython的是,特别是对于多线程方案。

In the book "IronPython in Action," the author states that IronPython, unlike CPython, benefits from certain optimizations, both in the JIT and in the framework itself, that CPython cannot take advantage of. Consequently, IronPython is potentially faster than CPython is, especially for multithreading scenarios.

IronScheme 受益于这样的优化?它是一个跨preTER(不是一个编译器),并且是它的跨preTER因为这是Lisp语言的本质,即它必须是PTED提供类Lisp的灵活性跨$ P $?如果它是一个跨preTER,可以将它从静止的优化有益于在抖动?

Does IronScheme benefit from such optimizations? Is it an interpreter (not a compiler), and is it an interpreter because that's the nature of Lisp, that it must be interpreted to provide the Lisp-like flexibility? If it is an interpreter, can it still benefit from optimizations in the jitter?

推荐答案

像IronPython的(以及最初的一家与我基于IronScheme的DLR),IronScheme编译一路下跌到白细胞介素的水平。

Like IronPython (well the initial one with the DLR that I based IronScheme on), IronScheme is compiled all the way down to IL level.

此外,还有一些没有跨$ P $在IronScheme PTED部分(除非你调用运行时符号查找的),因为我有pretty的多剥去了所有从DLR我的分支,因不被使用,降低了code足迹(我估计我只使用了大约25%的德国航空航天中心,其中的其余部分是相当的Python为中心的)。

Furthermore, there are no interpreted parts in IronScheme (unless you call runtime symbol lookup that), as I have pretty much ripped out all of that from my 'branch' of the DLR, due to not being used and reducing the code footprint (I estimated I only used about 25% of the DLR, where the rest was rather Python-centric).

要看到白细胞介素生成的内容,你可以看看在反射.NET(即 ironscheme.boot.dll 组装使用IL模式preferably,如C#趋向进行重组古怪,只是简单的错误在少数情况下)。此整个组件被编译由IronScheme。要查看运行时产生的code是一个很大的麻烦。

To see what IL gets generated, you can look at the ironscheme.boot.dll assembly in Reflector .NET (using IL mode preferably, as C# tends to be restructured weirdly and just plain wrong in a few cases). This entire assembly is compiled by IronScheme. To see runtime generated code is a lot more trickier.

至于说,这确实有JIT的所有优势,并与我做对DLR更计划为中心的优化,它一般表现速度比IronPython的,当我最后一次至少测试它(一个很好的18个月回,我知道IronPython的已自那时以来,相当多的改进,但IronScheme是几个因素的速度更快,甚至可以使用计划的感觉更像是Python来连球游戏)。

As said, this does have all the benefits of JIT, and with the optimizations I made on the DLR to be more Scheme-centric, it generally performed faster than IronPython when I last tested it (a good 18 months back at least, I realize IronPython has had quite a few improvements since then, but IronScheme was a few factors faster, even using Scheme that 'felt' more like Python to even the ball game).

此外,我试图利用尽可能多的.net框架作为IronScheme基础的,并且使互操作性​​容易。像载体字节载体二进制接口哈希表是基于正常的.NET类,我们都知道和使用; [对象] 字节[] 的Hashtable 分别,仅举几例。

Furthermore, I have attempted to utilize as much of the .NET framework as a foundation for IronScheme, and to make interoperability easier. Things like vectors, byte-vectors, binary-ports and hash-tables are based on the normal .NET classes we all know and use; object[], byte[], Stream and Hashtable respectively, to name a few.

 
精彩推荐