Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer,comp.lang.c Subject: Re: Arithmetic overflow checking Date: Mon, 11 Jul 2011 07:58:58 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <2rydnez7l-H5BYnTnZ2dnUVZ_vGdnZ2d@earthlink.com> <9LWdnZH2hdfmyYvTnZ2dnUVZ_vidnZ2d@posted.palinacquisition> <3797038f-22d1-40b2-8c12-60db5a0976b8@t5g2000yqj.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="18210"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mIYAOT1S3cQlq2eksw5Kqw5gxNTvU/Wo=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:KANKnwOrWfrYe/hPL7QnrZ8RMJk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6071 comp.lang.c:8133 On Sun, 10 Jul 2011 01:47:25 -0700 (PDT), tm wrote: [snip] >In other words: A missing hardware feature: > > Trigger interupt when overflow flag is set. > >Causes compilers and JVMs to omit overflow checks. No, it does not. Coupled with the idea of speed at all costs, yes. I think the safe option should be on by default. If you really need the speed, then you can make the decision to override. Most of the time, the speed is not required. I will take slightly slower, correct results over fast, possibly wrong results. Sincerely, Gene Wirchenko