Full-Waveform Inversion (FWI) derives high-resolution velocity models by minimizing the difference between observed and modeled seismic waveforms. Production of such high-resolution models is a highly demanding numerical task requiring in the order of billions of TFLOPs, and hence weeks, or even months, of computation time on supercomputers. Optimizing the numerical schemes used to carry out FWI is therefore of great importance since even minor optimizations can translate into significant savings in time and cost. Utilizing Devito, a domain specific language (DSL) and compiler for finite difference schemes, this project will explore various numerical optimizations, including efficient generation of random velocity boundary conditions and mixed-precision arithmetic algorithms, through machine learning techniques.