#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    16
    Rep Power
    0

    Python , .Net , java ??? Speed finding


    How do you think about speed of finding a string in a big file between these language programming ? What language is the fastest ?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    13
    Originally Posted by NPT
    How do you think about speed of finding a string in a big file between these language programming ? What language is the fastest ?
    If that's literally all you are doing, why not just use grep to do that?

    However, I would imagine that .NET is the fastest at parsing a file for a given string, with Python and Java trailing behind it. But like I said, if all you are doing is searching a file for one string, just use the existing tools that do it.
    Debian - because life's too short for worrying.
    Best. (Python.) IRC bot. ever.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    35
    String searching would, I'm guessing, be a matter of checking through the file one character at a time.

    I suspect the CLR, JVM and Python Interpreter have platform-dependant C or C++ code to handle reading files and string searching, so they should come out very close.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    16
    Rep Power
    0
    please help me , i'm going to use my application write in C# to call a file script Python , the Python script will process a text file( search,compare ...) and return result in C# . How do you think about it ? Will i get some advantage from this way ? help me please , thank so much

IMN logo majestic logo threadwatch logo seochat tools logo