stoke (1.69 MB)
Download file

Programs to evaluate superoptimizer STOKE.

Download (1.69 MB)
posted on 20.06.2022, 15:50 authored by Przemysław KowalewskiPrzemysław Kowalewski

STOKE is one of the Superoptimizers which are programs that given a function and a set of instructions of a processor, traverse through a space of programs that compute a given function and try to find the optimal usually in terms of execution speed or size of the binary. Authors of STOKE make some extraordinary claims. They suggest that it is able to produce programs that are multiple times faster than programs without any optimization, and programs which are at least as efficient as programs produced by gcc -O3 and sometimes expert handwritten assembly. The goal of this paper is to check these claims. In this paper classes of programs that STOKE may handle particularly well and any class of programs that stochastic optimization might not be able to handle will be identified. We conclude from the experiments described in this paper that STOKE is able to fulfill that statement in some cases. The searching algorithm of STOKE is not always able to find programs that are at least as efficient as programs optimized by gcc -O3. STOKE works particularly well in programs where a lot consecutive logical and mathematical operations are calculating (e.g. counting bits). It is often not that successful with programs containing loops where it sometimes can’t find a solution at all.





C and CPP source files and STOKE configuration files


TU Delft, Faculty of Electrical Engineering, Mathematics and Computer Science, Department of Software Technology

Usage metrics