HackerTrans
トップ新着トレンドコメント過去質問紹介求人

julienv

no profile record

投稿

SKDB

skdb.io
1 ポイント·投稿者 julienv·4 年前·1 コメント

コメント

julienv
·4 年前·議論
The SQL database that tells you when your query results changed
julienv
·4 年前·議論
Well, imagine your type-system was able to tell you exactly what roots are mutable in what scope. Now you can run a garbage collection on a single scope. That's not how it works, but in pseudo code:

collect { // Some code return ...; }

Well, if you don't have a type-system that tells you what is mutable, you have to either scan all the mutable roots, or maintain a write-barrier to know what could have captured data in the scope.

The problem with write-barriers, which is the go-to solution for generational GCs. Is that it is a conservative approach. Meaning, it will promote garbage in the cases where the pointer that lived outside of the scope is dead.

Let's take an example, again, in pseudo code:

myObject = { field1: []};

collect { myObject.field1 = [A, B, C]; myObject = null; }

If you use a write-barrier, what is going to happen is that [A, B, C] is going to be promoted, because the barrier is going to track the object myObject, and it doesn't realize that it's dead.

However, instead, imagine you have a type-system that tells you that in that scope, the only thing that can be mutated is myObject!

Well, now you can run that in a loop, without accumulating garbage!

Makes sense?
julienv
·4 年前·議論
Thanks! You can try the version in the site for testing if you want! If you want to build something, let us know!
julienv
·4 年前·議論
That's what SQLive is written in. Hence the name SkipLabs!
julienv
·4 年前·議論
Fixed! thanks!
julienv
·4 年前·議論
It's still very much used at SkipLabs. In fact, it's the language that SQLive is written in: http://sqlive.io

Unfortunately, we use a proprietary fork of SKIP, so that's why the OSS project looks dead.

We might open-source our version some day, but no plans for now.