chore: more work on benchmarks

This commit is contained in:
Johann Schopplich
2025-11-06 15:51:31 +01:00
parent bc711ccecf
commit a9d52fc69b
15 changed files with 1647 additions and 213 deletions

View File

@@ -61,14 +61,7 @@ export class QuestionBuilder {
}
/**
* Helper: Count items matching a predicate
*/
export function countByPredicate<T>(items: T[], predicate: (item: T) => boolean): number {
return items.filter(predicate).length
}
/**
* Helper: Rotate through question generators
* Rotate through question generators
*/
export function rotateQuestions<T>(
items: T[],