|slyrus||heh. 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...
|lisppaste||slyrus annotated #37456 with "debugger problems" at http://paste.lisp.org/display/37456#1|
|cpst||why are some of the language shootout SBCL benchmark programs written to use compiler flags for less safety?|
does that make much sense?
|lnostdal||less safety == more speed (?)|
|BrianRice||probably 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)?
|rahul||cpst: safety adds checks for things like array-bounds, types, etc.|
|cpst||I know, but why would you disable it?|
|rahul||if you elide them, you can get a little bump in speed, especially in inner loops|
|cpst||isn't it an unfair benchmark?|
|rahul||sure, that's why we disable it|
to make it fair
|cpst||I would never actually run code like that in most cases|
|rahul||yeah, it's a benchmark|
|cpst||but it doesn't benchmark how it actually performs|
|rahul||you'd probably hand-code inner loops in assembly or put them on an FPGA if you actually cared|
|cpst||on real code|
|rahul||no. it's a benchmark :)|
|cpst||seems like a stupid way to make SBCL look better|
|hefner||it isn't real code :)|
|rahul||well, C has a stupid way of not having those checks in the first place|
when in Texas...
|pkhuong||cpst: I use (safety 0) (speed 3) in `real code'.|
|rahul||if 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.
|pkhuong||or worse a primitive operation that's used in inner loops.|
|cpst||in 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
|rahul||that'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
|hefner||really cheating would be sprinkling (ldb (byte 32 0) ..) all through the arithmetic|
|pkhuong||hefner: instead we use mod.|
|hefner||who is 'we'?|