SKILL command: setof , exists

I

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
 
On Jul 28, 9:29 am, I-F AB <cop0...@gmail.com> wrote:
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
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
 
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
Ah yes, thanks. That makes perfect sense.
BTW, google seems to be very slow in updating threads here - has
anyone got a clue why?
 

Welcome to EDABoard.com

Sponsor

Back
Top