optimized special cases for compiled version of COMBINE

pull/95/head
jmoenig 2021-03-02 11:11:58 +01:00
rodzic cc01cd6733
commit c43ac46add
2 zmienionych plików z 15 dodań i 7 usunięć

Wyświetl plik

@ -11,6 +11,7 @@
### 2021-03-02
* threads: optimized special cases for COMBINE (sum, product, min, max) by up to 34 x
* threads: optimized special cases for compiled version of COMBINE
### 2021-03-01
* byob: improved layout and rendering of (+) buttons in custom block prototypes

Wyświetl plik

@ -6429,14 +6429,21 @@ Process.prototype.reportAtomicCombine = function (list, reporter) {
// #3 - optional | index
// #4 - optional | source list
var result, src, len, formalParameterCount, parms, func, i;
this.assertType(list, 'list');
var result = '',
src = list.itemsArray(),
len = src.length,
formalParameterCount = reporter.inputs.length,
parms,
func,
i;
// check for special cases to speed up
if (this.canRunOptimizedForCombine(reporter)) {
return this.reportListAggregation(
list,
reporter.expression.selector
);
}
result = '';
src = list.itemsArray();
len = src.length;
formalParameterCount = reporter.inputs.length;
if (len === 0) {
return result;