64 位 CLR 可以使用压缩指针吗? [英] Could the 64 bits CLR use compressed pointers?

查看:26
本文介绍了64 位 CLR 可以使用压缩指针吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了一些关于在一些 64 位 Java VM 实现中压缩对象指针的内容.据我了解,原理是将引用存储为从一个对象到另一个对象的相对 32 位地址偏移量,而不是完整的 64 位指针,以获取内存.

I've read a bit about compressed object pointers in some 64 bits Java VM implementations. As I understood it, the principle is storing a reference as a relative 32 bits address offset from one object to another instead of a full 64 bits pointer, to gain memory.

我相信这种优化目前不适用于 .NET CLR.至少我找不到任何关于它的信息.由于 CLR 的内部工作方式,它是否可能适用于它,或者是不可能的/无用的/性能下降的优化?

I believe that this kind of optimization is not currently applied to the .NET CLR. At least I couldn't find anything about it. Could it be potentially applied to it or would that be an impossible/useless/performance-degrading optimization because of how the CLR internally works?

推荐答案

虽然我不确定你是否可以在 .NET 中做这样的事情,但 64 位机器通常有充足的内存(一般 4 或 8G),因此节省几个 4 字节不会有太大影响.我会将其归类为不是很有用".

Though I'm not sure if you can do such a thing in .NET, a 64 bit machine generally has an abundant amount of memory (generally 4 or 8G), so saving a few 4 bytes won't have much effect. I would class it as "not very useful".

Google 没有显示任何迹象表明 .NET 能够支持(甚至对指针压缩/ORA 没有任何兴趣).

A quick Google hasn't shown me any signs of .NET being able to support (or even any interest in pointer compression/ORA).

这篇关于64 位 CLR 可以使用压缩指针吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆