let x be a factor, when multiplying with the x we will get the actual memory reference time;
effective time before cache was introduced = 1 x (30 x) = 30x
effective time after cache is introduced = 0.5( 1 x) + 0.5 ( 30 x) = 15.5x
since 50% time it is referencing cache.
performance gain = 30x /15.5x = 1.93