This answer doesn't address the FAST mode issue, it is another method to clear an fcurve and set new points that avoids looping either, reversing or using either the insert
or remove
methods of FCurve.keyframe_points
entirely.
import bpy
frames = [1, 9, 20]
samples = [0, 8, 0]
# some action
a = bpy.data.actions["SomeAction"]
fc = a.fcurves[0] # some fcurve
dp, i = fc.data_path, fc.array_index
# clear the fcurve by removing it
a.fcurves.remove(fc)
# new one
fc = a.fcurves.new(dp, index=i)
# new points
fc.keyframe_points.add(count=len(frames))
# populate points
fc.keyframe_points.foreach_set("co", [x for co in zip(frames, samples) for x in co])
# update
fc.update()