Skip to content

Commit 69661b9

Browse files
committed
fixed queue for other lisps.
1 parent 9f15a36 commit 69661b9

File tree

3 files changed

+137
-153
lines changed

3 files changed

+137
-153
lines changed

bench.lisp

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
(defun runner-bt (&optional (withreply-p nil) (asyncask nil) (queue-size 0))
2020
(declare (ignore queue-size))
2121
;; dispatchers used for the async-ask
22-
(setf *per-thread* 250000)
22+
(setf *per-thread* 125000)
2323
#+ccl
2424
(setf *per-thread* (if asyncask 10000 125000))
2525
(setf *system* (asys:make-actor-system '(:dispatchers (:shared (:workers 8)))))
@@ -57,7 +57,7 @@
5757
(defun runner-dp (&optional (withreply-p nil) (asyncask nil) (queue-size 0))
5858
(declare (ignore queue-size))
5959
#+sbcl
60-
(setf *per-thread* 250000) ;(if (or withreply-p asyncask) 50000 125000))
60+
(setf *per-thread* 125000) ;(if (or withreply-p asyncask) 50000 125000))
6161
#+ccl
6262
(setf *per-thread* (if asyncask 10000 125000))
6363
#+(or abcl clasp allegro lispworks8)

docs/perf.txt

+121-139
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
8443 => t: ~540
2-
10443 => t: ~666 ===> bail out
1+
macOS Sonoma 14.3.1, M1 Ultra 64 GB
32

4-
RAM: 16GB => still not working
5-
=> not related to host mem.
6-
73
-----------------------------------------------
8-
SBCL 2.0.10
4+
SBCL 2.4.1
95
-----------------------------------------------
106

117
* (runner-bt)
@@ -14,39 +10,40 @@ SBCL 2.0.10
1410

1511
Times: 1000000
1612
Evaluation took:
17-
1.149 seconds of real time
18-
6.767837 seconds of total run time (6.692038 user, 0.075799 system)
19-
[ Run times consist of 0.218 seconds GC time, and 6.550 seconds non-GC time. ]
20-
589.03% CPU
21-
3,670,169,358 processor cycles
22-
143,922,592 bytes consed
13+
0.551 seconds of real time
14+
8.424514 seconds of total run time (8.417146 user, 0.007368 system)
15+
[ Real times consist of 0.011 seconds GC time, and 0.540 seconds non-GC time. ]
16+
[ Run times consist of 0.010 seconds GC time, and 8.415 seconds non-GC time. ]
17+
1529.04% CPU
18+
176,248,864 bytes consed
19+
2320
Counter: 1000000
2421
Elapsed: 1
2522

2623
* (runner-bt t)
2724
Times: 1000000
2825
Evaluation took:
29-
2.940 seconds of real time
30-
15.289726 seconds of total run time (4.989670 user, 10.300056 system)
31-
[ Run times consist of 0.312 seconds GC time, and 14.978 seconds non-GC time. ]
32-
520.07% CPU
33-
9,385,812,947 processor cycles
34-
314,407,872 bytes consed
26+
3.673 seconds of real time
27+
39.371905 seconds of total run time (32.085699 user, 7.286206 system)
28+
[ Real times consist of 0.001 seconds GC time, and 3.672 seconds non-GC time. ]
29+
[ Run times consist of 0.001 seconds GC time, and 39.371 seconds non-GC time. ]
30+
1071.93% CPU
31+
256,183,248 bytes consed
32+
3533
Counter: 1000000
36-
Elapsed: 3
34+
Elapsed: 4
3735

3836
* (runner-bt t t)
3937
Times: 1000000
4038
Evaluation took:
41-
6.831 seconds of real time
42-
21.050441 seconds of total run time (13.324707 user, 7.725734 system)
43-
[ Run times consist of 4.381 seconds GC time, and 16.670 seconds non-GC time. ]
44-
308.15% CPU
45-
21,805,348,791 processor cycles
46-
2 page faults
47-
1,824,298,976 bytes consed
39+
1.504 seconds of real time
40+
9.408103 seconds of total run time (9.151678 user, 0.256425 system)
41+
[ Real times consist of 0.966 seconds GC time, and 0.538 seconds non-GC time. ]
42+
[ Run times consist of 0.942 seconds GC time, and 8.467 seconds non-GC time. ]
43+
625.53% CPU
44+
1,755,578,464 bytes consed
45+
4846
Counter: 1000000
49-
Elapsed: 7
5047

5148
--------------- shared ---------------
5249

@@ -55,49 +52,49 @@ Elapsed: 7
5552
=> shared actor
5653
Times: 1000000
5754
Evaluation took:
58-
1.293 seconds of real time
59-
12.001278 seconds of total run time (11.220945 user, 0.780333 system)
60-
[ Run times consist of 0.193 seconds GC time, and 11.809 seconds non-GC time. ]
61-
928.15% CPU
62-
4,127,234,610 processor cycles
63-
324,578,784 bytes consed
55+
1.085 seconds of real time
56+
10.606020 seconds of total run time (6.498268 user, 4.107752 system)
57+
[ Real times consist of 0.125 seconds GC time, and 0.960 seconds non-GC time. ]
58+
[ Run times consist of 0.122 seconds GC time, and 10.485 seconds non-GC time. ]
59+
977.51% CPU
60+
382,767,872 bytes consed
61+
6462
Counter: 1000000
65-
Elapsed: 2
63+
Elapsed: 1
6664

6765
* (runner-dp t)
6866
=> shared workers 8
6967
=> shared actor
70-
Times: 240000
68+
Times: 1000000
7169
Evaluation took:
72-
7.759 seconds of real time
73-
15.923882 seconds of total run time (2.832515 user, 13.091367 system)
74-
[ Run times consist of 0.007 seconds GC time, and 15.917 seconds non-GC time. ]
75-
205.23% CPU
76-
24,768,755,038 processor cycles
77-
113,326,512 bytes consed
78-
79-
Counter: 240000
80-
Elapsed: 8
81-
=> on the limit. using more messages SBCL will take expotentially longer to finish.
70+
3.003 seconds of real time
71+
35.598473 seconds of total run time (21.116686 user, 14.481787 system)
72+
[ Real times consist of 0.004 seconds GC time, and 2.999 seconds non-GC time. ]
73+
[ Run times consist of 0.004 seconds GC time, and 35.595 seconds non-GC time. ]
74+
1185.41% CPU
75+
462,156,336 bytes consed
76+
77+
Counter: 1000000
78+
Elapsed: 3
8279

8380
* (runner-dp t t)
84-
=> shared workers 50
81+
=> shared workers 8
8582
=> shared actor
86-
Times: 400000
83+
Times: 1000000
8784
Evaluation took:
88-
4.383 seconds of real time
89-
16.966884 seconds of total run time (8.290559 user, 8.676325 system)
90-
[ Run times consist of 2.266 seconds GC time, and 14.701 seconds non-GC time. ]
91-
387.11% CPU
92-
13,990,936,949 processor cycles
93-
2 page faults
94-
766,938,832 bytes consed
95-
Counter: 400000
96-
Elapsed: 4
85+
2.961 seconds of real time
86+
12.791957 seconds of total run time (8.335099 user, 4.456858 system)
87+
[ Real times consist of 1.942 seconds GC time, and 1.019 seconds non-GC time. ]
88+
[ Run times consist of 1.897 seconds GC time, and 10.895 seconds non-GC time. ]
89+
432.02% CPU
90+
1,962,820,864 bytes consed
91+
92+
Counter: 1000000
93+
Elapsed: 3
9794

9895

9996
-----------------------------------------------
100-
CCL 1.12
97+
CCL 1.12 - iMac Pro x86_64
10198
-----------------------------------------------
10299

103100
? (runner-bt)
@@ -187,145 +184,130 @@ Elapsed: 112
187184

188185

189186
-----------------------------------------------
190-
ABCL 1.8.0
187+
ABCL 1.9.2
191188
-----------------------------------------------
192189

193190
CL-USER(2): (runner-bt)
194191
=> shared workers 8, used only for async waiting actor
195192
=> pinned actor
196193

197194
Times: 1000000
198-
7.455 seconds real time
199-
33313792 cons cells
195+
6.921 seconds real time
196+
32761756 cons cells
200197
Counter: 1000000
201198
Elapsed: 7
202199

203200
CL-USER(4): (runner-bt t)
204201
Times: 1000000
205-
6.956 seconds real time
206-
33546173 cons cells
202+
9.451 seconds real time
203+
31647910 cons cells
207204
Counter: 1000000
208-
Elapsed: 7
205+
Elapsed: 9
209206

210-
CL-USER(7): (runner-bt t t)
211207
Times: 1000000
212-
20.815 seconds real time
213-
181465619 cons cells
208+
10.118 seconds real time
209+
109662158 cons cells
214210
Counter: 1000000
215-
Elapsed: 21
211+
Elapsed: 10
216212

217213
-------------------- shared --------------------
218214

219215
CL-USER(9): (runner-dp)
220216
=> shared workers 8
221217
=> shared actor
222218
Times: 1000000
223-
6.237 seconds real time
224-
54622191 cons cells
219+
6.731 seconds real time
220+
60731252 cons cells
225221
Counter: 1000000
226-
Elapsed: 6
222+
Elapsed: 7
227223

228224
CL-USER(11): (runner-dp t)
229225
=> shared workers 8
230226
=> shared actor
231227
Times: 1000000
232-
7.098 seconds real time
233-
57684205 cons cells
228+
8.915 seconds real time
229+
61829192 cons cells
234230
Counter: 1000000
235-
Elapsed: 7
231+
Elapsed: 9
236232

237233
CL-USER(14): (runner-dp t t)
238-
=> shared workers 50
239-
=> shared actor
240-
Times: 80000
241-
1.682 seconds real time
242-
14873001 cons cells
243-
Counter: 80000
244-
Elapsed: 2
245-
246-
CL-USER(2): (runner-dp t t)
247-
=> shared workers 50
234+
=> shared workers 8
248235
=> shared actor
249236
Times: 1000000
250-
24.805 seconds real time
251-
194439752 cons cells
237+
11.872 seconds real time
238+
116951862 cons cells
252239
Counter: 1000000
253-
Elapsed: 25
254-
255-
=> ABCL makes overall a very good picture.
256-
Probably because of the battle proven VM and the very efficient and proven GC.
240+
Elapsed: 11
257241

258242

259243
-----------------------------------------------
260-
LispWorks 8.0
244+
LispWorks 8.0.1
261245
-----------------------------------------------
262246

263247
CL-USER 9 > (runner-bt)
264248
Times: 1000000
265-
User time = 2.781
266-
System time = 0.694
267-
Elapsed time = 1.767
268-
Allocation = 240219976 bytes
269-
112471 Page faults
270-
GC time = 0.500
271-
Counter: 1000000
272-
Elapsed: 1
249+
User time = 3.865
250+
System time = 0.959
251+
Elapsed time = 2.599 <-
252+
Allocation = 3016212048 bytes
253+
17707 Page faults
254+
Calls to %EVAL 447
255+
GC time = 0.158Counter: 1000000
256+
Elapsed: 2
273257

274258
CL-USER 10 > (runner-bt t)
275259
Times: 1000000
276-
User time = 11.112
277-
System time = 5.484
278-
Elapsed time = 3.713
279-
Allocation = 593288432 bytes
280-
1281 Page faults
281-
GC time = 0.027
282-
Counter: 1000000
283-
Elapsed: 3
260+
User time = 10.182
261+
System time = 10.434
262+
Elapsed time = 5.898 <-
263+
Allocation = 3465326544 bytes
264+
147 Page faults
265+
Calls to %EVAL 279
266+
GC time = 0.039Counter: 1000000
267+
Elapsed: 6
284268

285269
CL-USER 11 > (runner-bt t t)
286270
Times: 1000000
287-
User time = 22.506
288-
System time = 5.408
289-
Elapsed time = 10.310
290-
Allocation = 2327968248 bytes
291-
775742 Page faults
292-
Calls to %EVAL 219
293-
GC time = 5.709
294-
Counter: 1000000
295-
Elapsed: 10
271+
User time = 11.759
272+
System time = 2.372
273+
Elapsed time = 4.162 <-
274+
Allocation = 4681355176 bytes
275+
154043 Page faults
276+
Calls to %EVAL 405
277+
GC time = 1.300Counter: 1000000
278+
Elapsed: 4
296279

297280
-------------------- shared --------------------
298281

299282
CL-USER 12 > (runner-dp)
300283
Times: 1000000
301-
User time = 9.678
302-
System time = 3.234
303-
Elapsed time = 3.905
304-
Allocation = 545296248 bytes
305-
201976 Page faults
306-
GC time = 1.629
307-
Counter: 1000000
284+
User time = 9.813
285+
System time = 5.437
286+
Elapsed time = 4.702 <-
287+
Allocation = 3217429544 bytes
288+
23192 Page faults
289+
Calls to %EVAL 579
290+
GC time = 0.284Counter: 1000000
308291
Elapsed: 4
309292

310293
CL-USER 13 > (runner-dp t)
311294
Times: 1000000
312-
User time = 22.872
313-
System time = 19.456
314-
Elapsed time = 4.726
315-
Allocation = 897306480 bytes
316-
744 Page faults
317-
GC time = 0.012
318-
Counter: 1000000
319-
Elapsed: 4
295+
User time = 21.889
296+
System time = 35.083
297+
Elapsed time = 9.287 <-
298+
Allocation = 3665359600 bytes
299+
293 Page faults
300+
Calls to %EVAL 279
301+
GC time = 0.108Counter: 1000000
302+
Elapsed: 9
320303

321304
CL-USER 14 > (runner-dp t t)
322305
Times: 1000000
323-
User time = 24.325
324-
System time = 4.782
325-
Elapsed time = 13.753
326-
Allocation = 2468653304 bytes
327-
1024802 Page faults
328-
Calls to %EVAL 261
329-
GC time = 8.650
330-
Counter: 1000000
331-
Elapsed: 13
306+
User time = 16.998
307+
System time = 5.861
308+
Elapsed time = 6.111 <-
309+
Allocation = 4881427552 bytes
310+
173663 Page faults
311+
Calls to %EVAL 567
312+
GC time = 1.588Counter: 1000000
313+
Elapsed: 6

0 commit comments

Comments
 (0)