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 <951152488e5da6d489bc523488e28310@www.novabbs.org>
Deutsch   English   Français   Italiano  
<951152488e5da6d489bc523488e28310@www.novabbs.org>

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

Path: ...!eternal-september.org!feeder2.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: Interpreters and indirect-branch prediction
Date: Wed, 13 Nov 2024 19:36:07 +0000
Organization: Rocksolid Light
Message-ID: <951152488e5da6d489bc523488e28310@www.novabbs.org>
References: <vfbfn0$256vo$1@dont-email.me> <c517f562a19a0db2f3d945a1c56ee2e6@www.novabbs.org> <jwv1q002k2s.fsf-monnier+comp.arch@gnu.org> <a3d81b5c64ce058ad21f42a8081162cd@www.novabbs.org> <jwvcyj1sefl.fsf-monnier+comp.arch@gnu.org> <abef7481ff0dd5d832cef0b9d3ea087a@www.novabbs.org> <jwv1pzhsahr.fsf-monnier+comp.arch@gnu.org> <8928500a87002966d6282465c037003e@www.novabbs.org> <jwvpln0qpel.fsf-monnier+comp.arch@gnu.org> <18bfd4ce1048f68ad4d39d972c459e99@www.novabbs.org> <2024Nov13.092027@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="2316116"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71
X-Rslight-Site: $2y$10$wMi4Bo2SEgQMFnDAGP10Ouz1Bc1hoyxpNXAleNg0KDwXmqMyyCXwu
Bytes: 2597
Lines: 29

On Wed, 13 Nov 2024 8:20:27 +0000, Anton Ertl wrote:

> mitchalsup@aol.com (MitchAlsup1) writes:
>>For something like a bytecode interpreter, the prediction accuracy
>>of the jump predictor is going to be epically bad.
>
> And with "jump predictor", you probably mean the indirect-branch
> predictor.
>
> On hardware of up to around 2005 where the indirect branches were at
> best predicted by BTBs with 2-bit counters, a "bytecode interpreter"
> with one shared indirect branch (as generated by the usual
> for...{switch...{...}} idiom in C) results in misprediction rates of
>>80% [ertl&gregg03jilp].

That certainly qualifies as bad.

>                         With one a non-shared indirect branch per VM
> instruction implementation (as in typical threaded-code
> implementations), we measured 50%-61% mispredictions for BTB with
> 2-bit counters in simulation [ertl&gregg03jilp] and similar results on
> actual CPUs.

50% misprediction rate qualifies as bad.
>
> We simulated 2-level history-based indirect branch predictors
> [ertl&gregg03jilp], and they typically have less than 10%
> mispredictions.

10% misprediction rate qualifies as "not so bad".