Knocking/pinging usually occurs only if the timing is *too* advanced for the grade of gasoline used. Advancing the timing will often improve performance or mpg as long as pinging does not occur under load.
Some ECU's have knock sensors and will alter the timing to prevent damage due to a low octane tank of gas. Don't know if the X has this system.

dave and xtoy - on regular