File tree 18 files changed +91
-29
lines changed
18 files changed +91
-29
lines changed Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: flexsearch-0.7.0</ title >
6
7
</ head >
7
8
< body >
8
9
< h2 > Benchmark: flexsearch-0.7.0</ h2 > < hr />
9
10
< h4 > Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</ h4 >
10
11
< div id ="result " style ="white-space: pre; font-family: Monospaced, monospace "> </ div >
11
- < script src ="https://rawcdn.githack.com/nextapps-de/flexsearch/master/dist/flexsearch.light.min.js "> </ script >
12
12
< script type ="module ">
13
13
14
+ import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/0.7.31/dist/module/index.js" ;
14
15
import { suite } from "../../bench.js" ;
15
-
16
16
let lib , split = / [ ^ a - z ] + / ;
17
17
18
18
suite [ "flexsearch-0.7.0" ] = {
19
19
20
20
init : function ( ) {
21
- lib = new FlexSearch . Index ( {
21
+ lib = new Index ( {
22
22
encode : str => str . toLowerCase ( ) . split ( split ) ,
23
23
tokenize : "strict" ,
24
24
resolution : 1 ,
25
+ cache : false ,
25
26
optimize : false ,
26
27
fastupdate : false ,
27
28
context : {
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
6
+ < title > Benchmark: flexsearch-0.8.0-cache</ title >
7
+ </ head >
8
+ < body >
9
+ < h2 > Benchmark: flexsearch-0.8.0-cache</ h2 > < hr />
10
+ < h4 > Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</ h4 >
11
+ < p style ="color: #f00 "> This test is using query cache and is outside the competition! It is just there for completion.</ p >
12
+ < div id ="result " style ="white-space: pre; font-family: Monospaced, monospace "> </ div >
13
+ < script src ="https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/flexsearch.light.min.js "> </ script >
14
+ < script type ="module ">
15
+
16
+ import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/module-min/lang/en.js" ;
17
+ import { suite } from "../../bench.js" ;
18
+
19
+ let lib ;
20
+
21
+ suite [ "flexsearch-0.8.0-cache" ] = {
22
+
23
+ init : function ( ) {
24
+ lib = new FlexSearch . Index ( {
25
+ encoder : EnglishPreset ,
26
+ tokenize : "strict" ,
27
+ resolution : 1 ,
28
+ cache : true ,
29
+ context : {
30
+ depth : 1 ,
31
+ bidirectional : false ,
32
+ resolution : 1
33
+ }
34
+ } ) ;
35
+ } ,
36
+ add : function ( data ) {
37
+ for ( let i = 0 , len = data . length ; i < len ; i ++ ) {
38
+ lib . add ( i , data [ i ] ) ;
39
+ }
40
+ } ,
41
+ query : function ( query ) {
42
+ return lib . searchCache ( query , 9999 ) ;
43
+ } ,
44
+ update : function ( data ) {
45
+ for ( let i = 0 , len = data . length ; i < len ; i ++ ) {
46
+ lib . update ( i , data [ i ] ) ;
47
+ }
48
+ } ,
49
+ remove : function ( data ) {
50
+ for ( let i = 0 , len = data . length ; i < len ; i ++ ) {
51
+ lib . remove ( i ) ;
52
+ }
53
+ }
54
+ } ;
55
+
56
+ </ script >
57
+ </ body >
58
+ </ html >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
- < title > Benchmark</ title >
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
6
+ < title > Benchmark: flexsearch-0.8.0-soundex</ title >
6
7
</ head >
7
8
< body >
8
- < h2 > Benchmark: flexsearch-0.8.0</ h2 > < hr />
9
+ < h2 > Benchmark: flexsearch-0.8.0-soundex </ h2 > < hr />
9
10
< h4 > Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</ h4 >
10
11
< div id ="result " style ="white-space: pre; font-family: Monospaced, monospace "> </ div >
12
+ < script src ="https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/flexsearch.compact.min.js "> </ script >
11
13
< script type ="module ">
12
14
13
- import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/index.js" ;
14
- import Encoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/encoder.js" ;
15
- import SoundexEncoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/lang/latin/soundex.js" ;
16
- import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/lang/en.js" ;
15
+ import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/module-min/lang/en.js" ;
17
16
import { suite } from "../../bench.js" ;
18
17
19
18
let lib ;
20
19
21
- suite [ "flexsearch-0.8.0" ] = {
20
+ suite [ "flexsearch-0.8.0-soundex " ] = {
22
21
23
22
init : function ( ) {
24
- lib = new Index ( {
23
+ lib = new FlexSearch . Index ( {
24
+ encoder : new FlexSearch . Encoder (
25
+ FlexSearch . Charset . LatinSoundex ,
26
+ EnglishPreset
27
+ ) ,
25
28
tokenize : "strict" ,
26
29
resolution : 1 ,
27
- encoder : new Encoder (
28
- EnglishPreset ,
29
- SoundexEncoder
30
- ) ,
30
+ cache : false ,
31
31
context : {
32
32
depth : 1 ,
33
33
bidirectional : false ,
Original file line number Diff line number Diff line change 9
9
< h2 > Benchmark: flexsearch-0.8.0</ h2 > < hr />
10
10
< h4 > Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</ h4 >
11
11
< div id ="result " style ="white-space: pre; font-family: Monospaced, monospace "> </ div >
12
- < script src ="https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55 /dist/flexsearch.compact .min.js "> </ script >
12
+ < script src ="https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview /dist/flexsearch.light .min.js "> </ script >
13
13
< script type ="module ">
14
14
15
- // import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/index.js";
16
- // import Encoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/encoder.js";
17
- import DefaultEncoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/lang/latin/default.js" ;
18
- import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/lang/en.js" ;
19
-
20
- // import Index from "../../../src/index.js";
21
- // import Encoder from "../../../src/encoder.js";
22
- // import DefaultEncoder from "../../../src/lang/latin/default.js";
23
- // import EnglishPreset from "../../../src/lang/en.js";
15
+ import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/module-min/lang/en.js" ;
24
16
import { suite } from "../../bench.js" ;
25
17
26
18
let lib ;
@@ -29,13 +21,10 @@ <h4>Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</h4>
29
21
30
22
init : function ( ) {
31
23
lib = new FlexSearch . Index ( {
24
+ encoder : EnglishPreset ,
32
25
tokenize : "strict" ,
33
26
resolution : 1 ,
34
27
cache : false ,
35
- encoder : new FlexSearch . Encoder (
36
- DefaultEncoder ,
37
- EnglishPreset
38
- ) ,
39
28
context : {
40
29
depth : 1 ,
41
30
bidirectional : false ,
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: fuse-7.1.0</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: js-search-2.0.1</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: lunr-2.3.9</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: lyra-0.2.4</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: minisearch-7.1.2</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: orama-3.1.1</ title >
6
7
</ head >
7
8
< body >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, height=device-height ">
5
6
< title > Benchmark: wade-0.3.3</ title >
6
7
</ head >
7
8
< body >
You can’t perform that action at this time.
0 commit comments