From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Linear Search
Date: Wed, 28 Sep 2016 19:23:14 +0200
Date: 2016-09-28T19:23:14+02:00 [thread overview]
Message-ID: <e52ck2Fos4U1@mid.individual.net> (raw)
In-Reply-To: <nsgrs8$a1j$1@dont-email.me>
On 16-09-28 18:41 , Jeffrey R. Carter wrote:
> This is not really Ada related, but on an Intel Atom x5-Z8500 computer running
> Linux Mint 18, I can find the maximum of 70 million random Unsigned_32s
> (generated using the Threefry RNG), using a sequential linear search, in about
> 200 ms. This is fast enough that it appears instantaneous to a human.
>
> Since the processor has 4 cores, a parallelization of the search using 8 tasks
> should be able to search 500 million values in about the same time (if they fit
> in memory).
>
> I can't imagine any real application in which I would keep that many values in
> memory. Usually they'd be in some sort of DB that would do the search for me. So
> now I'm wondering if there's really any need for O(log N)-search-time structures.
Sure there is: when you have to do the search, say, 1000 times per
second... because you are servicing 1000 net queries per second...
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2016-09-28 17:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 16:41 Linear Search Jeffrey R. Carter
2016-09-28 17:23 ` Niklas Holsti [this message]
2016-09-28 18:24 ` Jeffrey R. Carter
2016-09-28 21:03 ` Niklas Holsti
2016-09-28 22:20 ` Jeffrey R. Carter
2016-09-28 20:21 ` Randy Brukardt
2016-09-28 23:08 ` Jeffrey R. Carter
2016-09-29 5:40 ` Randy Brukardt
2016-09-29 4:39 ` Paul Rubin
2016-09-29 4:47 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox