FAQ
Hi,

I have about 200GB of data that I need to go through and extract the
common first part of a line. Something like this.
a = "abcdefghijklmnopqrstuvwxyz"
b = "abcdefghijklmnopBHLHT"
c = extract(a,b)
print c
"abcdefghijklmnop"

Here I want to extract the common string "abcdefghijklmnop". Basically I
need a fast way to do that for any two given strings. For my situation,
the common string will always be at the beginning of both strings. I can
use regular expressions to do this, but from what I understand there is
a lot of overhead. New data is being generated at the rate of about 1GB
per hour, so this needs to be reasonably fast while leaving CPU time for
other processes.

Thanks
Ravi

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 27 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedAug 2, '03 at 9:39p
activeAug 22, '03 at 7:42a
posts27
users12
websitepython.org

People

Translate

site design / logo © 2022 Grokbase