From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Introducing... Darren's Weekly Nugget! 1/16/2006

I wrote a VI in 7.1 to compare various string search functions

I found that match pattern is 3 times faster than the search split function

Did I do something wrong? 

0 Kudos
Message 21 of 23
(1,392 Views)

At first I thought the problem was that you were taking timestamps while other operations were happening, so I re-wrote your benchmark VI (attached below) to eliminate that possibility.  But I still saw that Match Pattern was faster even when I made this change.  I'm not sure why it's behaving differently now than when I benchmarked it in the past.  Perhaps it has to do with your string size, or the fact that the match string is at the end...it may even have to do with the fact that I'm running a quad core machine now, whereas I was running a single core when I wrote that nugget 3 1/2 years ago.

 

Either way, thanks for pointing this out.  I guess over time, even nuggets can become obsolete.  😉 

0 Kudos
Message 22 of 23
(1,374 Views)

Hi,

 

I ran Ben's test VI on my PC (i5, Win7 64 bit, Lv2013 32 bit) and still noticed that the "Search/Split String" is about 3 times faster than the "Match Pattern".

0 Kudos
Message 23 of 23
(605 Views)