From: "Simon Kröger" Date: 2005-08-14T18:55:02+09:00 Subject: Re: no clue Joe Van Dyk wrote: > Ah, ok. In my application, there's a bunch more than 3 possible keys > and they are of differing length. I am in control of the format of > the incoming strings though, and so could modify their format to make > them easier/faster to parse. Any ideas on what would be a more > efficient format for transporting the data? More different keys aren't a problem to this algorithm, but still there might be a lot better ways to transport the data. One is perhaps a string that can be 'executed' via 'eval' directly, but that is kind of hacky. Using binary data is perhaps the way to go, but of course much harder to debug. If you find a fast implementation of xml-rpc (a ruby extension, written in c) this might combine speed with readability. > (for reference, the original string format was "id: 3, x_position: 39, > y_position: 209, z_position: 39" and in my real application, there's > about twenty different attributes that are in the string.) Again, this will work with the algorithm, but perhaps not fast enough.. cheers Simon