
Stochastic Program Optimization - mping
https://blog.acolyer.org/2017/03/30/stochastic-program-optimization/
======
AbacusAvenger
The saxpy example is very strange. They clearly show that the left side (gcc
-O3) doesn't generate any SIMD code and that their "STOKE" optimizer does.
This isn't a fair comparison. All they need to do is add an -march flag (and
apparently the restrict keyword):

[https://goo.gl/7Ll4dp](https://goo.gl/7Ll4dp)

Now the GCC results look pretty much exactly like the "STOKE" results...

~~~
wohlergehen
On a related note, as far as I can tell the STOKE code seems to be incorrect
w.r.t. aliasing between y and x, i.e. if x == y + 1. Makes me wonder what SMT
solver claims are worth in the literature.

~~~
Karrot_Kream
I've worked with SMT solvers, Z3 in particular, before and it's definitely
doable to prove two pieces of code equivalent, but that depends on the
implementation used. Unfortunately, most academics, even when publishing at
very influential conferences, rarely present their code for audit.

~~~
wsxcde
STOKE is on github here:
[https://github.com/StanfordPL/stoke](https://github.com/StanfordPL/stoke).

Most CS conferences are making a big push towards "artifact evaluation," which
means that many papers now come with peer-reviewed implementations.

------
rawnlq
I recall reading about this from the same guys a few years ago (I'm not from
this field so I can't really figure out what's actually different):

[http://theory.stanford.edu/~aiken/publications/papers/asplos...](http://theory.stanford.edu/~aiken/publications/papers/asplos13.pdf)

I thought it was really cool that they managed to find improvements on hand-
optimized bit tricks from "Hacker's Delight" this way.

------
sedachv
Does anyone know what “fixed-point” in “fixed-point x86_64 assembly code
sequence” in the article means? I can think of three things (function
combinator, fixed point of a real-valued function, fixed point arithmetic),
none of which make sense to me in the context.

~~~
wsxcde
It means fixed-point arithmetic. Floating point in SMT doesn't work very well,
so that's why they have this restriction.

------
prestonbriggs
A friend wondered how they can make their improvements to SAXPY and claim
they're correct w/o using the restrict keyword.

------
tjpaudio
This is a bit more low-level than I comprehend. Would some one mind explaining
the significance and use of this?

~~~
sedachv
This is extending Massalin's idea of superoptimization
([https://www2.cs.arizona.edu/~collberg/Teaching/553/2011/Reso...](https://www2.cs.arizona.edu/~collberg/Teaching/553/2011/Resources/superoptimizer-
massalin.pdf)), which is a practical application of Gregory Chaitin's work on
applying information theory to algorithms
([https://www.cs.auckland.ac.nz/~chaitin/acm75.pdf](https://www.cs.auckland.ac.nz/~chaitin/acm75.pdf))
with better search methods than exhaustive search.

------
contravariant
Weird that they mention using MCMC and Metropolis Hastings but don't mention
simulated annealing, which would be the logical next step.

