The benchmark includes test implementations and results for over a hundred frameworks. Regularly, the benchmark results are published.
The benchmark evaluates performance by creating a large table and executing various operations on it. The benchmark includes the following sub-tests, simulating real-life scenarios:
- Create a thousand table rows with three columns: the row ID, a label, and a column with an icon to delete the row.
- Replace the row ID and label for all 1,000 rows.
- Update the label of every 10th row in the 1,000-row table.
- Select a row in the 1,000-row table.
- Swap two rows in the 1,000-row table.
- Remove one row from the 1,000-row table.
- Create a 10,000-row table with the same three columns as in point 1.
- Add 1,000 rows to the 10,000-row table.
- Finally, remove all 10,000 rows, i.e., empty the table.
The tests are run by a test driver, executed multiple times, and the median of the results is taken.
To run the tests on Reken, I had to clone the js-framework-benchmark, add the Reken framework test folder, and, since Reken is a non-keyed implementation, add it to the non-keyed folder. In addition to adding the reken.js library, I implemented the provided test page index.html. It contains a standard set of buttons that initiate the operations mentioned above, as well as the empty table.
After running the benchmark on Reken and comparing, analyzing, and profiling, I identified a few areas for improvement, especially in the data-for code. With these improvements in place, I submitted my implementation for the official benchmark.
You might be wondering how Reken compared to other frameworks. While I wish I could say, Reken was the fastest, unfortunately, it was not. Reken ranked 23rd out of 59 non-keyed frameworks with a weighted mean of 1.31. Reken was faster than React, which ranked 39th with a weighted mean of 1.65, and also faster than well-known frameworks such as Elm and Vue.
Looking at individual sub-tests, Reken performed even better, particularly in more heavy-duty operations, and less in short (single) row operations. Reken also scored very well in time to first paint (startup performance) and reasonably well in the compressed total size of the implementation.
|Create 1000 rows
|Replace 1000 rows
|Update every 10th row
|Create 10,000 rows
|Append 1000 rows
|First Paint (Startup)
|Compressed bytes transferred
To learn more about Reken check out our Reken Developer Handbook