kriskowal/asap — pull request #32 by kriskowal (2014-02-16 06:22:02+00:00)
Title: WIP Raw ASAP

I am posting this for review. Really, I need some help understanding these benchmark results, or for someone to offer an improved benchmark. At the very least, to @rkatic’s credit, it is quite difficult to improve upon his performance optimizations.

My very naïve benchmark for Matcha:
https://gist.github.com/kriskowal/9029929

The results: `raw/asap+array` is this branch. `raw/asap+queue` is this branch except using @petkaantonov’s Deque.

https://docs.google.com/spreadsheet/ccc?key=0An5phhxDkYDPdGNWWlYyeXREY2lMLUJUbXBmWWZTSVE#gid=0

These latter branches introduce raw ASAP, which doesn’t do error handling. Oddly, it seems to perform worse than error-handling ASAP in any case. I am very confused or not reading these right.

Petka’s Queue does seem to be faster than a simple array when each test schedules 20 tasks in a single event.

@stefanpenner The loop when flushing an array is a little more nuanced than the RSVP version to ensure that flushing can resume if the task throws an error. Not sure whether that’s a case you care about.