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


Groups > comp.lang.forth > #28684

Re: Forth reinvention

From "Rod Pemberton" <dont_use_email@xnohavenotit.cnm>
Newsgroups comp.lang.forth
Subject Re: Forth reinvention
Date 2014-02-22 10:27 -0500
Organization Aioe.org NNTP Server
Message-ID <op.xbovvo065zc71u@localhost> (permalink)
References <b5ec955a-146f-41ea-a227-22e4224cab49@googlegroups.com> <o7KdncO2m9MJxJvOnZ2dnUVZ_tOdnZ2d@supernews.com> <2014Feb21.155029@mips.complang.tuwien.ac.at> <le7usa$l9g$1@dont-email.me> <2014Feb22.135404@mips.complang.tuwien.ac.at>

Show all headers | View raw


On Sat, 22 Feb 2014 07:54:04 -0500, Anton Ertl  
<anton@mips.complang.tuwien.ac.at> wrote:
> "Alex McDonald" <blog@rivadpm.com> writes:

>> And then, only if you can demonstrate that there are lower hanging  
>> fruit,
>> by which I take it you mean easier ways to programmatically get the 4x
>> speedup. I would be surprised if you could point to an example that
>> didn't involve an observation as to the general stupidity of programmers
>> who select inappropriate and dreadful algorithms.
>
> In my course on efficient programs the students often optimize a
> program I give them, and in several cases I have given them a program
> written by someone else, and speedups by a factor of 4 or more were
> not rare.  Were the original programmers stupid?  I don't think so.
> In any case, even for relatively small programs, there is a lot of
> sequential performance that can be gained, and I expect that there is
> more in larger programs.
>
> With regard to stupidity: In 2009 I chose a program for converting
> uids into user names (on a Unix system), which is a performance
> bottleneck for ls -l on servers with many users.  Some Unix variants
> therefore go away from the good old principle of just editing the
> passwd file (which contains the mapping), and require to call some
> system-specific program afterwards.
>
> In this case, I think the programmers were stupid.  There are lots of
> ways to do better without requiring to call that program explicitly;
> among them is to call that program automatically when such a mapping
> is needed and the passwd file is newer than the mapping file.  A group
> of my students that used such an approach got a speedup by a factor of
> 600 when the cache file is up-to-date (the usual case).

Or, you could have "that program" which provides "such a mapping"
be called automatically by the Unix tools which update the password file
when a new user account is created.  Then, "such a mapping" is always
up-to-date, and then there is never a need to "call that program
explicitly".  But, the on-demand or "demand paging" style solution you
posted here works too.

When I started to read the part of the reply on converting uids to
user names, I thought you were going to mention how they unexpectedly
used a more efficient method of integer-to-string conversion or a new
type of hashing.  I.e., anti-climatic.  It seems other things have
become more important over time than speed, e.g., security, convenience.


Rod Pemberton

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Forth reinvention dambere@web.de - 2014-02-20 01:19 -0800
  Re: Forth reinvention "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-20 05:07 -0500
    Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-20 14:56 +0000
      Re: Forth reinvention "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-20 16:16 -0500
        Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-20 23:25 +0000
          Re: Forth reinvention "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-20 20:42 -0500
            Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-21 12:41 +0000
  Re: Forth reinvention Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-20 11:18 +0100
    Re: Forth reinvention dambere@web.de - 2014-02-20 02:36 -0800
      Re: Forth reinvention Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-20 17:35 +0100
        Re: Forth reinvention dambere@web.de - 2014-02-20 11:34 -0800
          Re: Forth reinvention "Elizabeth D. Rather" <erather@forth.com> - 2014-02-20 09:53 -1000
          Re: Forth reinvention Paul Rubin <no.email@nospam.invalid> - 2014-02-20 12:23 -0800
            Re: Forth reinvention dambere@web.de - 2014-02-20 14:00 -0800
              Re: Forth reinvention Paul Rubin <no.email@nospam.invalid> - 2014-02-20 14:23 -0800
                Re: Forth reinvention dambere@web.de - 2014-02-22 02:21 -0800
                Re: Forth reinvention AKK <akk@nospam.org> - 2014-02-22 12:02 +0100
              Re: Forth reinvention Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-21 04:38 -0600
          Re: Forth reinvention Mark Wills <markrobertwills@yahoo.co.uk> - 2014-02-20 12:35 -0800
            Re: Forth reinvention Paul Rubin <no.email@nospam.invalid> - 2014-02-20 13:38 -0800
  Re: Forth reinvention m.a.m.hendrix@tue.nl - 2014-02-20 03:59 -0800
    Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-20 15:11 +0000
      Re: Forth reinvention m.a.m.hendrix@tue.nl - 2014-02-20 07:41 -0800
  Re: Forth reinvention Richard Owlett <rowlett@pcnetinc.com> - 2014-02-20 06:38 -0600
    Re: Forth reinvention dambere@web.de - 2014-02-20 12:03 -0800
  Re: Forth reinvention Julian Fondren <julian.fondren@gmail.com> - 2014-02-20 07:08 -0800
  Re: Forth reinvention "Elizabeth D. Rather" <erather@forth.com> - 2014-02-20 09:37 -1000
    Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-20 20:50 +0000
      Re: Forth reinvention "Elizabeth D. Rather" <erather@forth.com> - 2014-02-20 15:39 -1000
        Re: Forth reinvention albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-21 10:50 +0000
        Re: Forth reinvention Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-02-21 11:10 +0000
          Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-21 13:50 +0000
        Re: Forth reinvention Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-21 05:46 -0600
          Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-21 12:55 +0000
          Re: Forth reinvention anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-21 15:11 +0000
            Re: Forth reinvention Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-22 09:23 -0600
        Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-21 12:38 +0000
        Re: Forth reinvention anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-22 13:29 +0000
          Re: Forth reinvention "Elizabeth D. Rather" <erather@forth.com> - 2014-02-22 07:52 -1000
            Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-22 19:06 +0000
            Re: Forth reinvention anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-23 13:40 +0000
    Re: Forth reinvention "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-20 20:40 -0500
      Re: Forth reinvention "Elizabeth D. Rather" <erather@forth.com> - 2014-02-20 18:43 -1000
        Re: Forth reinvention Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-21 13:16 +0100
      Re: Forth reinvention stephenXXX@mpeforth.com (Stephen Pelc) - 2014-02-21 10:49 +0000
    Re: Forth reinvention anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-21 14:50 +0000
      Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-21 16:28 +0000
        Re: Forth reinvention anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-22 12:54 +0000
          Re: Forth reinvention "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-22 10:27 -0500
          Re: Forth reinvention "Alex McDonald" <blog@rivadpm.com> - 2014-02-22 17:49 +0000
      Re: Forth reinvention Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-21 20:51 +0100
        Re: Forth reinvention Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-22 09:39 -0600
          Re: Forth reinvention Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-23 02:40 +0100
            Re: Forth reinvention Paul Rubin <no.email@nospam.invalid> - 2014-02-22 19:24 -0800
              Re: Forth reinvention Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-23 22:48 +0100
            Re: Forth reinvention Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-23 04:39 -0600
              Re: Forth reinvention Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-23 22:46 +0100
                Re: Forth reinvention Paul Rubin <no.email@nospam.invalid> - 2014-02-23 14:26 -0800
                Re: Forth reinvention Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-24 02:44 +0100
                Re: Forth reinvention Spam@ControlQ.com - 2014-03-03 12:43 -0500
                Re: Forth reinvention Paul Rubin <no.email@nospam.invalid> - 2014-03-03 10:06 -0800
                Re: Forth reinvention Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-24 03:59 -0600
  Re: Forth reinvention mike73900@gmail.com - 2014-03-03 14:04 -0800
    Re: Forth reinvention mhx@iae.nl - 2014-03-05 06:59 -0800
      Re: Forth reinvention Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2014-03-05 16:33 +0100
      Re: Forth reinvention Mark Wills <markwills1970@gmail.com> - 2014-03-05 09:08 -0800
        Re: Forth reinvention mhx@iae.nl - 2014-03-05 10:47 -0800
  Re: Forth reinvention AKK <akk@nospam.org> - 2014-03-07 07:30 +0100
    Re: Forth reinvention Lars Brinkhoff <lars.spam@nocrew.org> - 2014-03-07 07:55 +0100
    Re: Forth reinvention albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-03-07 09:29 +0000
      Re: Forth reinvention AKK <akk@nospam.org> - 2014-03-07 12:04 +0100
      Re: Forth reinvention "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-03-07 17:03 -0500
        Re: Forth reinvention Mark Wills <markwills1970@gmail.com> - 2014-03-08 05:31 -0800

csiph-web