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


Groups > comp.lang.c++ > #123692

Re: A neat hash table implementation

From wij <wyniijj5@gmail.com>
Newsgroups comp.lang.c++
Subject Re: A neat hash table implementation
Date 2026-04-10 19:50 +0800
Organization A noiseless patient Spider
Message-ID <ca7eee2f1134ba8b581b04e342c9942ecff4bdcd.camel@gmail.com> (permalink)
References <10r3tfp$32mbm$1@dont-email.me> <10r9rj9$qfob$1@raubtier-asyl.eternal-september.org> <20260410131006.00007680@yahoo.com> <10rallk$115f6$1@raubtier-asyl.eternal-september.org>

Show all headers | View raw


On Fri, 2026-04-10 at 13:07 +0200, Bonita Montero wrote:
> Am 10.04.2026 um 12:13 schrieb Michael S:
> 
> > On the other hand, it's harder work. Exact requirements for Hash are not
> > specified in easy-to-read language. I don't know about you, but for me
> > personally it feels like going on mine field.
> 
> Most hashers are 5min of work.

I doubt that.

> > C. std::unordered_map<> can be surprising.
> > I think, it was you who showed us such case couple of years ago, when
> > you tried to use string literals as keys.
> 
> Maybe that was before C++17. Today I'd use a string_view.
> 
> > E. Compilation time. Slow.
> > Could not be a problem when unordered_map used in just few compilation
> > units. Could be serious problem otherwise.
> 
> I'm using a compiler which supports C++20 modules.
> With that compile times are a magnitude lower.

Clib has a principle (me thinks): Clib only contains those that app. (system
utilities, strictly) cannot do without.... So, basically, 'unbeatable'.
Many of your 'better implement' are false.

hsearch(3) is a special case in that it is 'too fast', so fast to out-weight
other deficiency.

Your C++ (and c++ std-lib) is basically a macro language,  Many things can
be done between the final code (say assembly) and the user's code, not 
necessarily in c++'s type system (language), kind of description.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: A neat hash table implementation Michael S <already5chosen@yahoo.com> - 2026-04-10 13:13 +0300
  Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-10 13:07 +0200
    Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-10 19:50 +0800
      Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-10 14:34 +0200
        Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-10 21:11 +0800
          Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-10 15:19 +0200
            Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-10 22:35 +0800
              Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-10 17:07 +0200
                Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-11 00:16 +0800
                Re: A neat hash table implementation scott@slp53.sl.home (Scott Lurndal) - 2026-04-10 16:30 +0000
                Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-10 18:50 +0200
                Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-11 01:40 +0800
                Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-11 08:26 +0200
                Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-11 20:09 +0800
                Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-11 14:29 +0200
              Re: A neat hash table implementation Michael S <already5chosen@yahoo.com> - 2026-04-10 18:12 +0300
                Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-11 00:26 +0800
        Re: A neat hash table implementation 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-04-10 16:38 +0200
          Re: A neat hash table implementation Bonita Montero <Bonita.Montero@gmail.com> - 2026-04-10 17:08 +0200
    Re: A neat hash table implementation wij <wyniijj5@gmail.com> - 2026-04-10 19:51 +0800

csiph-web