Replacing all mesh elements in a Mesh object
The functions for the removal of mesh elements for Mesh(ID) are turned off in the source code.

#if 0 /* BMESH_TODO Remove until BMesh merge */
    func = RNA_def_function(srna, "remove", "ED_mesh_vertices_remove");
    RNA_def_function_flag(func, FUNC_USE_REPORTS);
    RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to remove", 0, INT_MAX);
#endif
}


from_pydata is a utility function written in python. You could use bmesh but it might be slower.

I.e. (see verts.new, edges.new, faces.new)

import bmesh
bm = bmesh.new()
for co in vert_data:
    bm.verts.new(co)

#bm.verts.ensure_lookup_table()    

for edge_indices in edge_data:
    bm.edges.new((
        bm.verts[edge_indices[0]],
        bm.verts[edge_indices[1]]
        ))
for face_indices in face_data:
    bm.faces.new(tuple(
        bm.verts[index] for index in face_indices
        ))

bm.to_mesh(obj.data)
bm.free()


Btw: I was able to crash blender using this simple script to test from_pydata for existing geometry.