Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vkk9o5$25bs$1@gal.iecc.com>
Deutsch   English   Français   Italiano  
<vkk9o5$25bs$1@gal.iecc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: John Levine <johnl@taugh.com>
Newsgroups: comp.arch
Subject: Re: branch guessing, Microarchitectural support for counting
Date: Thu, 26 Dec 2024 19:11:01 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <vkk9o5$25bs$1@gal.iecc.com>
References: <2024Oct3.160055@mips.complang.tuwien.ac.at> <8IcMO.249144$v8v2.147178@fx18.iad> <37dc69bc0327e6d56e452090424c80c9@www.novabbs.org> <20241226123229.0000222a@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 26 Dec 2024 19:11:01 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
	logging-data="71036"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <2024Oct3.160055@mips.complang.tuwien.ac.at> <8IcMO.249144$v8v2.147178@fx18.iad> <37dc69bc0327e6d56e452090424c80c9@www.novabbs.org> <20241226123229.0000222a@yahoo.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)

According to Michael S  <already5chosen@yahoo.com>:
>Yes, compilers often generate such code.
>When coding in asm, I typically know at least something about
>probability of branches, so I tend to code it differently:

The first version of FORTRAN had a FREQUENCY statement which let you tell it the
relative likelihood of each of the results of a three-way IF, and the expected number of
iterations of a DO loop.  It turned out to be useless, because programmers usually
guessed wrong.

The final straw was a compiler where they realized FREQUENCY was implemented
backward and nobody noticed.

Unless you've profiled the code and you data to support your branch guesses,
just write it in the clearest way you can.

-- 
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly