Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12331

Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think)

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From "Mayayana" <mayayana@invalid.nospam>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think)
Date Sun, 3 Jan 2021 08:54:19 -0500
Organization A noiseless patient Spider
Lines 24
Message-ID <rssian$hjo$1@dont-email.me> (permalink)
References <rspm4t$1pm1$1@gioia.aioe.org> <rspt2m$613$1@dont-email.me> <rsq4fr$2tr$1@gioia.aioe.org> <rsqku7$ksc$1@dont-email.me> <rsqnho$157m$2@gioia.aioe.org> <rsqs1f$5le$1@dont-email.me> <rsrtfa$1v8c$1@gioia.aioe.org>
Injection-Date Sun, 3 Jan 2021 13:54:31 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="f7a6a46306191b06712beeb133a7f6fd"; logging-data="18040"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//QRdF7jcf+kCYySPcPKERf9BOLcK5L2s="
Cancel-Lock sha1:7+XUFxzyG/Onz3rEQRwbuKp+WIw=
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader Microsoft Outlook Express 6.00.2900.5512
X-Priority 3
X-MSMail-Priority Normal
Xref csiph.com microsoft.public.scripting.vbscript:12331

Show key headers only | View raw


"R.Wieser" <address@not.available> wrote

| The whole process using the 25 MB string still takes several seconds to
| complete though.  Oh well.
|

  Did you try a UCase or LCase first and then
ReadAll? I don't see the point of reading by line
unless you expect to be quitting near the
beginning.

  I don't know how case works. It wouldn't be
difficult to just search for "65 or 97" (A or a).
But either way it's a more complex search.

 I imagine it might also depend on the length
of the search string and how many similarities
there are. If you have 25 MB of "orange is the
new black" and one instance of "orange is the
new green" near the end, I would expect all those
near matches to bog things down. But I've never
actually tested it.

Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why does a loop using instr() and mid() get slower on larger data ? "R.Wieser" <address@not.available> - 2021-01-02 12:41 +0100
  Re: Why does a loop using instr() and mid() get slower on larger data ? "Mayayana" <mayayana@invalid.nospam> - 2021-01-02 08:39 -0500
    Re: Why does a loop using instr() and mid() get slower on larger data ? "R.Wieser" <address@not.available> - 2021-01-02 16:46 +0100
      Re: Why does a loop using instr() and mid() get slower on larger data ? "Mayayana" <mayayana@invalid.nospam> - 2021-01-02 15:26 -0500
        Re: Why does a loop using instr() and mid() get slower on larger data ? "R.Wieser" <address@not.available> - 2021-01-02 22:11 +0100
          Re: Why does a loop using instr() and mid() get slower on larger data ? "Mayayana" <mayayana@invalid.nospam> - 2021-01-02 17:27 -0500
            Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think) "R.Wieser" <address@not.available> - 2021-01-03 08:58 +0100
              Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think) "Mayayana" <mayayana@invalid.nospam> - 2021-01-03 08:54 -0500
                Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think) "R.Wieser" <address@not.available> - 2021-01-03 16:01 +0100
                Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think) "Mayayana" <mayayana@invalid.nospam> - 2021-01-03 12:51 -0500
                Re: Why does a loop using instr() and mid() get slower on larger data ? - found it (I think) "R.Wieser" <address@not.available> - 2021-01-03 19:26 +0100
          Re: Why does a loop using instr() and mid() get slower on larger data ? "Mayayana" <mayayana@invalid.nospam> - 2021-01-02 17:43 -0500
  Re: Why does a loop using instr() and mid() get slower on larger data ? JJ <jj4public@gmail.com> - 2021-01-03 02:47 +0700
    Re: Why does a loop using instr() and mid() get slower on larger data ? "R.Wieser" <address@not.available> - 2021-01-02 21:47 +0100

csiph-web