Association Table Limitation PLEASE HELP

Discussion in 'Cadence' started by bur.rosario, May 26, 2008.

  1. bur.rosario

    bur.rosario Guest

    I'am thinking to use Association Table to save data...

    My question is what is the maximum number of elements that the
    Association Table of Cadence SKILL can handle and wherein it will not
    crash?

    About a 1000?

    Please reply. Thanks in advance! (^^_)v
     
    bur.rosario, May 26, 2008
    #1
  2. bur.rosario

    Riad KACED Guest

    Hi There,

    Have you encountered any problem already with this ?
    Does it crash at 1001 ? Why don't you give it a try actually ?
    I'm not an expert of this subject but I haven't heard about any
    limitation so far and I'm might be wrong.
    I've quickly written this piece of skill and seems to run well at 1000
    and even 1e6 and beyond ...

    ;; Procedure starts here
    procedure( rkTestAssocTable(n outFile)
    let((myAssocTable tblKey mySortedKeys outPort)
    myAssocTable = makeTable(gensym('newAssocTbl) nil)
    outPort=outfile(outFile)
    for(i 0 n
    sprintf(tblKey "key_%d" i)
    myAssocTable[tblKey]=i
    )
    mySortedKeys = sort(myAssocTable~>? nil)
    when(outPort
    foreach(key mySortedKeys
    fprintf(outPort "%s -> %d\n" key myAssocTable[key])
    )
    close(outPort)
    view(get_filename(outPort))
    )
    t
    )
    )
    ;; Procedure ends here


    I've run :
    ciw> measureTime(rkTestAssocTable(1000000 "/tmp/toto"))
    It gives a good results after 7.604519 secondes.

    My keys are integer-based as you can see. I could have run this
    function up to it's limit : n=2147483647 (2**31-1) but I didn't ...
    You can try if you want !

    Well, I haven't really answered you question but hope this could help
    you anyway :)

    Riad.
     
    Riad KACED, May 26, 2008
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.