Superoscillatory wave forms, i.e., waves that locally oscillate faster than their highest Fourier component, possess unusual properties that make them of great interest from quantum mechanics to signal processing. However, the more pronounced the desired superoscillatory behavior is to be, the more difficult it becomes to produce, or even only calculate, such highly fine-tuned wave forms in practice. Here, we investigate how this sensitivity to preparation errors scales for a method for constructing superoscillatory functions which is optimal in the sense that it minimizes the energetic expense. We thereby also arrive at very accurate approximations of functions which are so highly superoscillatory that they cannot be calculated numerically. We then investigate to what extent the scaling and sensitivity results for superoscillatory functions on the real line extend to the experimentally important case of superoscillatory functions that are periodic.