BLOB Searching

Mehboob Alam (11/3/08 8:10AM)
Jeffrey Kain (11/3/08 10:53AM)
Paul Mohammadi (11/3/08 11:22AM)


Mehboob Alam (11/3/08 8:10 AM)

Does anyone know of available BLOB text search/replace routines
(preferably not plugins) that can give results closer to 8ms than
1350ms?

Just to be clear.. are you asking for an algorithm in uncompiled 4D
code that may be as fast as compiled C code?

Rob's API Pack has a routine "API Find in Blob"..

http://pluggers.nl/api_pack.html

sincerely,

mehboob alam

To make a bad day worse, spend it wishing for the impossible.

--- On Mon, 11/3/08, Norman Kinsey <NK4D@... wrote:

From: Norman Kinsey <NK4D@...

Date: Monday, November 3, 2008, 10:41 AM

If I use the BLOB search routine below to search a 64K blob

for a 10

character string (towards the end of the blob) it takes

1350 milliseconds.

If I use ITK_BlobSearch to do the same search it takes 8

milliseconds.

Both tests were done uncompiled on a fast G4.

Does anyone know of available BLOB text search/replace

routines (preferably

not plugins) that can give results closer to 8ms than

1350ms?

Jeffrey Kain (11/3/08 10:53 AM)

<EB8EBE254C16534D9BC41A91DAECF87804AEB117@...

You should do your comparison when compiled. The plug-in call is

compiled C code, while your code is uncompiled 4D code.

If you're using v11, you could create a little component with your

search method, compile it, and drop it into your interpreted database.

Your component code will then run at compiled speed.

Jeff

-----Original Message-----

From: Norman Kinsey

Sent: Monday, November 03, 2008 10:41 AM

If I use the BLOB search routine below to search a 64K blob for a 10

character string (towards the end of the blob) it takes 1350

milliseconds.

If I use ITK_BlobSearch to do the same search it takes 8 milliseconds.

Both tests were done uncompiled on a fast G4.

Does anyone know of available BLOB text search/replace routines

(preferably

not plugins) that can give results closer to 8ms than 1350ms?

Paul Mohammadi (11/3/08 11:22 AM)

<948eda980811030822s652fdda6m9cb91380e0f12aed@...

Norman,

Following Jeff's advice, after glancing at your code, I think you need
to

revise it. The code logic itself is inefficient because it is using
brute

force to conduct the match.  Consider implementing some flavor of

Boyer-Moore.

Best

Paul

Reply to this message

Summary created 11/3/08 at 11:41AM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com