Re: strcspn(3) complexity improvement

From: Peter Jeremy (PeterJeremy_at_optushome.com.au)
Date: 03/31/05

  • Next message: Garrett Wollman: "Re: Heads up: gtar gone from base system"
    Date: Thu, 31 Mar 2005 21:25:49 +1000
    To: Brooks Davis <brooks@one-eyed-alien.net>
    
    

    On Wed, 2005-Mar-30 10:31:45 -0800, Brooks Davis wrote:
    >The real question I have is, how long does the string need to be before
    >this is a win and how much does it hurt for typical string lengths?
    >I've written code with strcspn that needed to perform well, but it was
    >parsing 80-column punch card derived formats.

    I was thinking about this last night. The easy way is to generate random
    "string" and "charset" arrays of varying length and time both strcspn()
    variants - this gives you two two-dimensional surfaces showing timing
    vs argument size. The difficulty is visualising the result and
    deciding whether pairs of random strings are realistic.

    -- 
    Peter Jeremy
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Garrett Wollman: "Re: Heads up: gtar gone from base system"

    Relevant Pages

    • Demo: OO Cobol
      ... It inserts 50,000 random strings into a structure then does ... * Random string inserted into collections ... procedure division. ... perform Timer-on ...
      (comp.lang.cobol)
    • Re: FAQ: How can I generate good strong passwords?
      ... and take a string of 20 or more characters from the second line to use ... upper/lower case, numbers, special characters, ect. ... generating random strings, is it storing them -- it said it didn't and as ... had to put your finger exactly on the scanner as when your key was generated. ...
      (alt.internet.wireless)
    • Generating random strings
      ... I am generating 12 random strings and my code works fine when I step ... ArrayList arrEmailAddresses = new ArrayList; ... //create 12 random email addresses for domain ... foreach (string address in arrEmailAddresses) ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Fast way to generate unique strings
      ... > what is the fastest VBA code to generate a list of random strings of a ... > Public Function GetUniqueString(ByVal NumChars As Long) As String ... > Public Function RandBetweenAs Long ...
      (microsoft.public.excel.programming)
    • Re: Expected value
      ... >A string of unit length is cut into n random strings. ... >What is the expected value of the shortest string ... Prev by Date: ...
      (sci.math)