Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And it's more deterministic without random pauses.


The reference counting also causes pauses when freeing large object graphs. Fully concurrent GC does not cause any pauses and it's more efficient. It also has less memory overhead per object.


What GC doesn't cause any pauses?

I know of some who claim to be "pauseless", but it's b.s. marketing. They also tend to be memory hogs that don't play well with other processes in low memory environments with the kind of allocation behavior seen in UI applications.

And of course, the issue is not only stop-the-world pauses (though those are especially bad), but any pause in any thread period. A RC system lets you have consistent, predictable performance and often can be completely eliminated through static analysis.


Here you have a GC engine that is completely pauseless: https://github.com/pebal/sgcl

It is available as a C++ library, so you can easily compare its performance to the reference counting.


That's why I said random pauses.

RAII can also cause pauses when freeing large object graphs. It's not unique to RC. However in practice it's usually much less of an issue than GC pauses. It's only been an issue for me once in my entire career.


In C++ one can combine RAII with allocators in order to avoid calling alloc/frees in latency critical paths.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: