-
Notifications
You must be signed in to change notification settings - Fork 656
Speed
Mathias Rangel Wulff edited this page Oct 29, 2015
·
7 revisions
AlaSQL is very focused on speed and we make sure to use all the tricks we can find to make javascript spit out your results as quick as possible. For example:
- Queries are cached as compiled functions.
- Joined tables are pre-indexed
-
WHERE
expressions are pre-filtered for joins
The results are good. Check out AlaSQL vs. other javaScript SQL databases:
-
3x speed compared to SQL.js selecting with
SUM
,JOIN
, andGROUP BY
. -
1x speed compared to WebSQL selecting with
SUM
,JOIN
, andGROUP BY
(in-memory opperations for WebSQL - see this discussion) -
2x speed compared to Linq for
GROUP BY
on 1,048,576 rows
More tests
Every part must be optimized, so lets compare some cases where you would often use another library:
- Sorting with AlaSQL vs Lodash vs Underscore vs. vanilla js - Sorting via SQL does not ned to be so far from vanilla javascript speed
- Finding the right data AlaSQL vs. CrossFilter
- Finding the right data AlaSQL vs. CrossFilter 2
- Grouping AlaSQL vs. handcrafted javacsript - based on SatckOverflow question on grouping.
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo