Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Melzzzzz Newsgroups: comp.programming Subject: Re: Research to Create Automated Buffer Overflow Protection Date: Tue, 26 Aug 2014 20:16:34 +0200 Organization: None Lines: 54 Message-ID: References: <4i3Lv.231350$m41.167051@fx34.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: solani.org 1409076994 14296 eJwFwQkBwDAIA0BL40kKcqAF/xJ2B6PwHifoWKy9VlRHU1pFNzT5hQUHlzYUmy5/J3c9kvUDFKsQ3w== (26 Aug 2014 18:16:34 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 26 Aug 2014 18:16:34 +0000 (UTC) X-User-ID: eJwFwYEBwCAIA7CX6ICC59Qp/59gkk7wr2AycnKUU+OzVClvYFOrqCHsiBsWbNzDi0+ItgcfNRDI X-Newsreader: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Cancel-Lock: sha1:sgf8N+GmmXzAzQMDhWpAfKYJHwo= X-NNTP-Posting-Host: eJwNxcEBwEAEBMCWHHZJOUj0X8JlPgPj4YQTdCz2idb9r44cSpopksdqV2NAkfAx2/reTrAuGV0RCg== Xref: csiph.com comp.programming:4716 On Tue, 26 Aug 2014 18:16:47 +0100 Richard Heathfield wrote: > > If you add bounds-checking to C (which is what we're talking about, > really), (a) you discover eventually that people have already done > it, and (b) bounds-checking imposes a performance penalty that at > least some people are not prepared to tolerate. For example take scimark2 in "go" language: with bounds checking bmaxa@maxa:~/examples/go/src/github.com/bmaxa/sci$ go build -o scimark2 bmaxa@maxa:~/examples/go/src/github.com/bmaxa/sci$ time ./scimark2 ** ** ** SciMark2 Numeric Benchmark, see http://math.nist.gov/scimark ** ** for details. (Results can be submitted to pozo@nist.gov) ** ** ** Using 2.00 seconds min time per kernel. Composite Score: 1060.91 FFT Mflops: 933.39 (N=1024) SOR Mflops: 1235.80 (100 x 100) MonteCarlo: Mflops: 179.01 Sparse matmult Mflops: 1485.93 (N=1000, nz=5000) LU Mflops: 1470.43 (M=100, N=100) real 0m34.279s user 0m34.232s sys 0m0.055s without: bmaxa@maxa:~/examples/go/src/github.com/bmaxa/sci$ go build -o scimark2 -gcflags -B bmaxa@maxa:~/examples/go/src/github.com/bmaxa/sci$ time ./scimark2 ** ** ** SciMark2 Numeric Benchmark, see http://math.nist.gov/scimark ** ** for details. (Results can be submitted to pozo@nist.gov) ** ** ** Using 2.00 seconds min time per kernel. Composite Score: 1231.16 FFT Mflops: 1177.07 (N=1024) SOR Mflops: 1258.24 (100 x 100) MonteCarlo: Mflops: 168.89 Sparse matmult Mflops: 1702.12 (N=1000, nz=5000) LU Mflops: 1849.46 (M=100, N=100) real 0m30.569s user 0m30.531s sys 0m0.046s It is 20% faster without bounds checking ! -- Click OK to continue...