mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
added ttables2 to gather data about issue #183
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
output: '''true'''
|
||||
cmd: "nimrod cc --gc:none --hints:on $# $#"
|
||||
cmd: "nimrod cc --hints:on $# $#"
|
||||
"""
|
||||
|
||||
import hashes, tables
|
||||
|
||||
21
tests/run/ttables2.nim
Normal file
21
tests/run/ttables2.nim
Normal file
@@ -0,0 +1,21 @@
|
||||
discard """
|
||||
output: '''true'''
|
||||
cmd: "nimrod cc --hints:on $# $#"
|
||||
"""
|
||||
|
||||
import tables
|
||||
|
||||
proc TestHashIntInt() =
|
||||
var tab = initTable[int,int]()
|
||||
for i in 1..1_000_000:
|
||||
tab[i] = i
|
||||
for i in 1..1_000_000:
|
||||
var x = tab[i]
|
||||
if x != i : echo "not found ", i
|
||||
|
||||
proc run1() = # occupied Memory stays constant, but
|
||||
for i in 1 .. 50: # aborts at run: 44 on win32 with 3.2GB with out of memory
|
||||
TestHashIntInt()
|
||||
|
||||
run1()
|
||||
echo "true"
|
||||
Reference in New Issue
Block a user