bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Is the speed of array index checking same as string compa


From: arnold
Subject: Re: [bug-gawk] Is the speed of array index checking same as string comparison?
Date: Tue, 27 Nov 2018 04:30:10 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Peng Yu <address@hidden> wrote:

> Here is the correct one. It seems that there is only a constant factor
> (~40%) slow-down no matter how large the hash size is. Is it?

That is certainly what your numbers show.

As I mentioned, gawk goes to a lot of trouble to keep array access with
constant time no matter how many elements in the array.

What are you trying to accomplish?  I suspect that the effort you're
putting into measuring things in isolation isn't worthwhile as I/O
usually swamps computation in awk programs.

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]