faster CIs (#13803)
* ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
This commit is contained in:
parent
2a278f6eba
commit
8088633250
72 changed files with 532 additions and 1082 deletions
|
|
@ -22,7 +22,7 @@ import asyncdispatch
|
|||
import threadpool
|
||||
|
||||
proc f1() =
|
||||
waitFor sleepAsync(100)
|
||||
waitFor sleepAsync(20)
|
||||
echo "hello"
|
||||
|
||||
spawn f1()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ type
|
|||
|
||||
const
|
||||
ThreadsCount = 129
|
||||
SleepTime = 1000
|
||||
SleepTime = 250
|
||||
|
||||
proc worker(p: Marker) {.thread.} =
|
||||
acquire(p.lock)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
discard """
|
||||
outputsub: "129"
|
||||
outputsub: "65"
|
||||
"""
|
||||
|
||||
import os, locks
|
||||
import locks
|
||||
|
||||
type
|
||||
MarkerObj = object
|
||||
|
|
@ -11,7 +11,7 @@ type
|
|||
Marker = ptr MarkerObj
|
||||
|
||||
const
|
||||
ThreadsCount = 129
|
||||
ThreadsCount = 65
|
||||
|
||||
proc worker(p: Marker) {.thread.} =
|
||||
acquire(p.lock)
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
discard """
|
||||
errormsg: "'threadFunc' is not GC-safe"
|
||||
file: "tthreadanalysis2.nim"
|
||||
line: 37
|
||||
cmd: "nim $target --hints:on --threads:on $options $file"
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
var
|
||||
thr: array[0..5, Thread[tuple[a, b: int]]]
|
||||
|
||||
proc doNothing() = discard
|
||||
|
||||
type
|
||||
PNode = ref TNode
|
||||
TNode = object {.pure.}
|
||||
le, ri: PNode
|
||||
data: string
|
||||
|
||||
var
|
||||
root: PNode
|
||||
|
||||
proc buildTree(depth: int): PNode =
|
||||
if depth == 3: return nil
|
||||
new(result)
|
||||
result.le = buildTree(depth-1)
|
||||
result.ri = buildTree(depth-1)
|
||||
result.data = $depth
|
||||
|
||||
proc echoLeTree(n: PNode) =
|
||||
var it = n
|
||||
while it != nil:
|
||||
echo it.data
|
||||
it = it.le
|
||||
|
||||
proc threadFunc(interval: tuple[a, b: int]) {.thread.} =
|
||||
doNothing()
|
||||
for i in interval.a..interval.b:
|
||||
var r = buildTree(i)
|
||||
echoLeTree(r) # for local data
|
||||
root = buildTree(2) # BAD!
|
||||
#echoLeTree(root) # and the same for foreign data :-)
|
||||
|
||||
proc main =
|
||||
root = buildTree(5)
|
||||
for i in 0..high(thr):
|
||||
createThread(thr[i], threadFunc, (i*100, i*100+50))
|
||||
joinThreads(thr)
|
||||
|
||||
main()
|
||||
|
|
@ -11,7 +11,7 @@ type PComm = ptr Channel[int]
|
|||
|
||||
proc doAction(outC: PComm) {.thread.} =
|
||||
for i in 0 ..< 5:
|
||||
sleep(rand(100))
|
||||
sleep(rand(50))
|
||||
send(outC[], i)
|
||||
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue