From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4fbd260da735f6f4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 29 Apr 2007 23:21:14 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Reading and writing a big file in Ada (GNAT) on Windows XP References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Sun, 29 Apr 2007 23:21:15 -0500 NNTP-Posting-Host: 24.6.140.189 X-Trace: sv3-JWEyi8E8S45af3Qnh1KqdBYGS4UoXi07bLFCHYxeMfj/VjwNWDZjlzpHlSatnXVQqmn6EjPK7d386Bz!KLHtcpQOjKeVgsRGK4VJMydbkKXVHA8acUbEHYcKYdP0F9bd/HzxJpqKNwKPplE04juIdgkvUj8M!7djiv6y719cRQxr30HJADqvf6ZaW X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.34 Xref: g2news1.google.com comp.lang.ada:15410 Date: 2007-04-29T23:21:15-05:00 List-Id: Using Gnat 3.15p my Windows 2000 3.0GHz machine with an older disk wrote 10K 700 character lines in 0.14 sec. It read them back, doing Ada.Strings.Fixed.Index for "b" (which they did not contain) in 1.5 seconds. That should translate to 1650 seconds or 27.5 minutes to do a read+scan+write on 10M such lines. Skipping the IO and just doing the scan 10K times took 0.4 seconds. Replacing the Ada.Strings.Fixed.Index with a loop searching for 'b' took 0.02 seconds. So, if your program takes 5 hours something seriously unpleasant is going on.