Actions

Blog/October 2018/Oct 5th

From RonWareWiki

< Blog‎ | October 2018
Revision as of 08:41, 12 October 2018 by Ron (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


October 5th

The week started off with preparations for the holiday “Shemini ʿAṣeret”, which is on the “eighth day” of Sukkot; but since Sukkot only has seven days, this holiday is a separate one, though it’s adjacent to the preceding holiday. Yes, we’re confused by it too.

Confusion notwithstanding, we had a restful holiday; we decided that sleeping-in was a good idea, so we pretty much were lazy bums. Not that there’s anything wrong with that, you understand! Anyway, the beginning-of-the-Jewish-year-holiday bonanza is over, and we’re back to work.

Esther really went back to work: she’s got IRS deadlines and her company has a big backlog of work because of the holidays, so she is working every day, at their office. She comes back exhausted, and I try my best to have a decent dinner waiting for her. I’m the domestic type.

I too have gone “back to work”. Some of my clients have awakened and are preparing to give me tasks, and a brand-new (potential) client found me via “big-data” analysis. Don’t ask me.

But I spent most of my time doing some research for 8th. Specifically, on speeding up some of the slower parts. My big win was getting “maps” to be about twice as fast as before (gory details ahead, you’ve been warned!), which results in 8th performing one of my benchmarks more than twice as fast as the previously fastest version. So that’s pretty cool.

<tech>
So what was the big speedup? First, I’ll explain what a “map” is, in case you don’t already know. All it is, is a way to make it possible to associate a “key” (usually a bit of text, like “cat”) with a “value” (could be anything, like “Felix”). It’s a data-structure which is used extensively in many programming languages, and certainly it is in 8th.

All versions of 8th until this current one, used the “hash table” implementation from SQLite. I did that because SQLite’s known to be fast and very stable, and the code is free to be used. But then I did some benchmarking against other languages, specifically to see how my “map” fared. It didn’t do so well, to be honest.

Some of that’s due to other architectural issues in 8th, but a significant bit is due to the choice of hash-table used by SQLite (and 8th). The version they use is a “chaining” one, which in that implementation did a lot of memory allocations (when there were “hash collisions”). I switched that to an “open addressing” version (with limited linear probing).

As a result, the hash-table (”map”) implementation in 8th is now about twice as fast as before, as well as using less memory in general. Win-win!
</tech>


Besides all that, nothing exciting to report. Trying to resume our normal schedule after all the holidays, and not succeeding too well just yet.

It’s been quite hot, though it’s going to be relatively pleasant for the upcoming week. According to the weather site I use, this past September marks four months in a row which were average or below average in temperature. I concur: this summer’s been very mild for the Middle East (at least, for our part of it).

We’re back to the basic-three this shabbat. We’re looking forward to:
ḥalla, chicken soup with matsa-balls, chicken breast with artichokes, various salatim, and chocolate-chip cookie bars.

Until next time,
shabbat shalom and ḥag sameaḥ!




Top: Blog Prev: Sep 28th Next: Oct 12th