SBCL 存储大图的效率如何?
当处理内存中的大量对象时,垃圾收集器对性能的影响有多大?内存分配和释放开销有多大? 使用 SBCL 来执行此操作是否明智,还是构建一个小型 C 库来通过 FFI 连接更好?
How much does the garbage collector affect performance when working with lots of objects in memory, how big is the memory allocation and dealocation overhead?
Is it wise to use SBCL to do this or is better to build a small C library to connect trough FFI?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您所做的只是分配,那么每个对象只会有少量(几个字节)的开销。如果系统进行了各种分配和释放,一般来说,外部碎片会导致与已用空间一样多的浪费空间,或者 100% 的开销。
If all you have done is allocate, then you will just have a small (a few bytes) of overhead per object. If the system has done a variety of allocations and deallocations, as a general rule external fragmentation results in about as much wasted space as used space, or a 100% overhead.