Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: George Jones Newsgroups: gnu.bash.bug Subject: Re: [PATCH] Implement rehashing for associative arrays (Re: speeding up hash_search?) Date: Mon, 20 Apr 2020 11:16:15 -0400 Lines: 51 Approved: bug-bash@gnu.org Message-ID: References: <20200420124911.GW845@eeg.ccf.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1587395792 4701 209.51.188.17 (20 Apr 2020 15:16:32 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Koichi Murase Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hXN0aA5ZLB7e60GICrTj1zb3N6jxmG2DzahFYq6Fx8k=; b=VLrZZ0wsxCcE/y0o7pq/at8sdMh5WHP7UfAChfAaXsz66GEOHMawjR4MspWAJS/hTj QI8424/gyc6nhJYme/ZmI/Xef6evJq48Q3KE2Hm3ysTy/kb0qO9mE8G5MIwhmuL0q24X wc1MKo7mHCaWCKOypQbz4f8EAla1yGgpHkJusa/kYcr1JbqZ4bMraWT1Y1onOTdGYj1W v3xrX4zoB/H/Q5UeXyaSudFIjda8gWvzgwFwBI9WcBrlKCcn2UpdLSF/65yrYGGn8mfj LudRmZ1jp46JbZDwqny30Tp+5jAQqWaRplEsdLKE2Ay/Q/qjx+4Nfiv5iRzRamS9c6be z24A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hXN0aA5ZLB7e60GICrTj1zb3N6jxmG2DzahFYq6Fx8k=; b=VRVNXcP3ZkEZFVcYjfM0hSz6IguoKv7oEfB2I+0uEu4BI5+ui6zL7GN0zi/j18Zst3 GBsSCtI+zuCaSFsxIgeOiuBbWkSkDP06e4yCjKlHIWvjRN01enXdBtvgmNWaCW/SQBU2 +FYTy0HKjs7hF8cI2/6UIclT6so9K4+zNEcDHXdb/D41HLrrzBzzr5Qu1TurgHRsDpVB sQ5+fKAxHw2cxqnbTWt2VA5FKoIN7FzEELh4cMzGYclptRGqy6iP/RitzfXZFncpFqes wNBEXuVPQlBpxmXWgjs2KLY3LC1wyXyBm/AYxETvEwh73dBCt0wdmZkIs+xraAPGYnKw XonA== X-Gm-Message-State: AGi0PubgqDjqmzXk4uFK3t/lqEo/GnkJOfygFLgSGY4XkfwPE+9pli1j EXVsrzbD1DTeW883JsYpmn1CYOPWmaxBnpNpFqA= X-Google-Smtp-Source: APiQypLPTkm9g/FzinBr9XEexn9eTAvWxPMlDS/CYkTPvOvHCycf/t0RSXsXO73X+ZKTr8pZ7MgreBd9cDIYOtc1mqk= X-Received: by 2002:a9d:1d45:: with SMTP id m63mr9420288otm.89.1587395786558; Mon, 20 Apr 2020 08:16:26 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::343; envelope-from=fooologist@gmail.com; helo=mail-ot1-x343.google.com X-detected-operating-system: by eggs1p.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::343 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <20200420124911.GW845@eeg.ccf.org> Xref: csiph.com gnu.bash.bug:16191 No problem. Glad you fixed it. It's been a LONG time since I've actually written C, so probably best if someone current did it. On the parameters, I suggest you consider exposing the at user level as a switch or env var. My use case was pathologically large (and would have been better on, e.g. Spark if that were and option in the environment). Even the old behavior was probably good enough for most people. It's only when you start abusing bash to to "big data" that the problem shows up. Thanks again, and impressive quick work ! ---george jones On Mon, Apr 20, 2020, 10:48 AM Koichi Murase wrote: > 2020-04-20 23:05 Chet Ramey : > > On 4/20/20 8:49 AM, Greg Wooledge wrote: > > > On Mon, Apr 20, 2020 at 06:48:44PM +0900, Koichi Murase wrote: > > >> Also, I am sorry that I disturbed your plan for contributing to Bash. > > >> I actually initially doubted that the insertion with the current > > >> implementation is O(N), so I created the test first and then found > > >> that it is an easy fix rather than reimplementing it by B-tree or > > >> other data structures. I couldn't stop my interest in how much it is > > >> improved by the easy fix. > > > > > > This should in no way make the OP feel that they didn't contribute. > > > Spotting and diagnosing problems is important work, even if their > > > proposed patch wasn't selected as the best solution. > > > > This is quite true. > > Dear All, > > Yes, thank you for clarification and sorry for confusing writing. I > did not mean George's contribution disappeared, but just I have > disturbed his five-step plan on his blog where the remaining four > steps are now canceled. I have to add that identifying the problem is > definitely the most non-trivial part because it is relatively > straightforward to fix the problem once the problem is identified :). > Also, I would like to thank George for additional testing of my patch. > > Of course, this also applies to my patches. I think I have sent more > than ten patches so far and many of them have been applied, but I am > anyway happy if the problems are solved. You can always reject my > patches when you have better solutions. > > -- > Koichi >