CLJ-1410 Benchmarks
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
$
%
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
|
 
Still loading...
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Current time / 10k laps
Proposed, worst case
Proposed, best case
2
Small set (10 elements)
30ms30ms (1.0x)1.4ms
3
Large set (1000 elements)
4600ms4600ms (1.0x)1.9ms
4
Small vector4.5ms6ms (1.33x)1.4ms
5
Large vector370ms380ms (1.02x)1.8ms
6
7
8
So overhead is O(1) with a small, easily-JITed constant (the `instance?` test). Potential benefit is O(n).
9
Sets give the clearer benefit since their (re)construction time is relatively expensive.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...
 
 
 
Sheet1