marcoonroad / families

Concatenation-based prototypes implementation for Lua. :microscope: :crescent_moon: :family_man_woman_girl_boy: :house_with_garden:
https://marcoonroad.github.io/families/
MIT License
3 stars 0 forks source link

Provide benchmarks & documentation for used concatenative clone-families algorithms. #8

Open marcoonroad opened 7 years ago

marcoonroad commented 7 years ago

In the experimental lua-51 branch I using a split & scan algorithm where the cloning procedure splits the current original prototype in two, the former part will be the new structure for the prototype and the latter, the structure/dictionary for clone object. With that approach, I have achieved support for Lua v5.1 while maintaining the Clone early, Clone often lemma. This kind of implementation is in some sense asynchronous, cause the evaluation order of super-structure scanning is unknown until runtime. The whole super/original structure/dictionary can be iterated entirely, or just a few (mostly due pairs function semantics). That implementation relies on coroutines rather than master branch's finalizers. The respective scanners hold strong references for such parent structure, but not the objects (the clone & prototype, they won't ever notice that super structure). The scanner copies lazily the fields from that parent structure, when the scan process finishes, it collects itself, thus, decreasing the pointer/counter for that super structure (which will be prone to GC).

marcoonroad commented 7 years ago

I have created the finalizers branch (from master base) to gather the GC finalizer algorithm for a matter of historical optimization. The branch master will be merged with the lua-51 branch.

marcoonroad commented 7 years ago

Benchmarks should be run on:

I will use the following implementations on benchmark:

I should take the following intervals/levels of cloning hierarchies (the forkbomb test on spec/ directory is a hint of such thing):

Also, I must populate the structures with the following number of entries:

Later, if my machine supports the charge, I will test both entries & levels intervals together. Tests must be ran at least 10 times, and the average time will be taken from such reports.

marcoonroad commented 6 years ago

Benchmarks were deferred to the next release/version. But such issue will remain open yet.

marcoonroad commented 5 years ago

BUMP:

I should move documentation from the wiki pages. They are terrible to navigate and edit. A better approach would be online documentation on the landing page of this project. With Jekyll, that thing is not hard (in fact, this project already uses Jekyll on README.md documentation -- the branch for GH pages deploy is gh-pages).