RE: Faster parse for strtok.e
- Posted by Andy Serpa <renegade at earthling.net> Mar 21, 2002
- 418 views
> Thanks, i'll give it a spin. The find_all() is so easy to drop into > code, i keep on > using it. I have been going thru strtok() lately, not to speed it up so > much, > but add functionality, without breaking backwards compatability. Any > suggestions for strtok.e v2? > I'll have to think about that. I mainly use that parse routine -- I was looking to speed some things up and the current version looked a little strange so I re-wrote it. For most other string operations I've been using the regex .dll now that we've got that stdcall/cdecl stuff worked out fairly reasonably. I'm writing a function library for the regex wrapper. Actually ended up rewriting the wrapper for speed. (Note to Karl B.: setting the regex_head, _match, _tail on every regex_find for a large subject is INCREDIBLY expensive if you want to search for the same pattern multiple times on the same subject. By taking those out & allocating subject once separately it speeds up a "match all" loop by 100 times. Not 100% -- 100 times!) > I am interested in what you are doing in Ai stuff. Wanna tell? > I have been playing around with genetic algorithms, classifier systems, and the like for years. Euphoria sequences are perfect for that kind of stuff. I actually just wrote a genetic programming system in Euphoria a couple of days ago. (Programs that write themselves.) Right now it is basically an automatic "function finder" because it can only create mathmatical expressions from a set of data points, but soon I will add "if" statements and boolean operators and it will be able to make decision trees. If I get it polished enough I'll send it to the archive...