SKILL command: setof , exists

Discussion in 'Cadence' started by I-F AB, Jul 28, 2011.

  1. I-F AB

    I-F AB Guest

    Hi,

    I have a large data list containing lists of which I would want to
    process.
    I'm wondering which of the codes below is more efficient:

    caar(setof(x LargeLongList cadr(x)=="metal" ))
    caar(exists(x LargeLongList cadr(x)=="metal" ))

    I'm not sure how to check the runtime with Virtuoso's Debugger.
    Can anyone enlighten me?

    Thanks,
    I-FAB
     
    I-F AB, Jul 28, 2011
    #1
  2. I-F AB

    Marcel Preda Guest

    Hi there,

    "exists" is definitively faster than "setof" .
    "exists" stops when find first element that satisfy condition.
    "setof" will scan all the list and returns all the elemets that
    satisfy condition.

    Best Regards,
    Marcel
     
    Marcel Preda, Jul 30, 2011
    #2
  3. I-F AB

    I-F AB Guest

    Hi there,
    Ah yes, thanks. That makes perfect sense.
    BTW, google seems to be very slow in updating threads here - has
    anyone got a clue why?
     
    I-F AB, Aug 3, 2011
    #3
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.