#lisp - Tue 27 Feb 2007 between 00:02 and 01:05

NY Lost Funds



slyrusheh. I was just wondering about that.
not that I knew how to get the whole disassembly of course...
well, there's another bug to fix...
lisppasteslyrus annotated #37456 with "debugger problems" at http://paste.lisp.org/display/37456#1
slyrusjsnell: nlx.lisp?
cpstwhy are some of the language shootout SBCL benchmark programs written to use compiler flags for less safety?
does that make much sense?
lnostdalless safety == more speed (?)
BrianRiceprobably to make the generated code more equivalent to the C benchmark code
to ask it in another way: why *wouldn't* you want to disable compiler safety settings for benchmark code (where you know that all the inputs have been validated)?
rahulcpst: safety adds checks for things like array-bounds, types, etc.
cpstI know, but why would you disable it?
rahulif you elide them, you can get a little bump in speed, especially in inner loops
cpstisn't it an unfair benchmark?
rahulsure, that's why we disable it
to make it fair
cpstI would never actually run code like that in most cases
rahulyeah, it's a benchmark
cpstbut it doesn't benchmark how it actually performs
rahulyou'd probably hand-code inner loops in assembly or put them on an FPGA if you actually cared
cpston real code
rahulno. it's a benchmark :)
cpstseems like a stupid way to make SBCL look better
hefnerit isn't real code :)
rahulwell, C has a stupid way of not having those checks in the first place
when in Texas...
pkhuongcpst: I use (safety 0) (speed 3) in `real code'.
rahulif you have proven yourself that there are no safety problems in the code, why add the extra checks?
especially if it's an inner loop where speed really matters.
pkhuongor worse a primitive operation that's used in inner loops.
jsnellhttp://shootout.alioth.debian.org/gp4/faq.php#means
cpstin most of those cases, shouldn't SBCL be able to inference it away?
I suppose one example would be bignum vs. fixnum arithmetic, it's hard to prove things won't go to bignums if they start at fixnums
rahulthat's why you don't declare things as fixnum
you declare them as what they really are.
but even then, if there's recursion or looping, it may be hard to write inferences that can converge on the range of results
write an inferer, that is
hefnerreally cheating would be sprinkling (ldb (byte 32 0) ..) all through the arithmetic
pkhuonghefner: instead we use mod.
hefnerwho is 'we'?

Page: 2 9 16 23 

IrcArchive

NY Lost Funds