@Carl Love Thanks! By testing in my computer, your codes cost 0.375 seconds . My codes cost 0.672 seconds .
It's much better! I read the help of NonIsomorphicGraphs. I noticed one option output=iterator .
For output=iterator a module is returned. When called as a procedure, it outputs the next graph in the sequence. The iterator output is similar to the graphs output, but the complete sequence of graphs is never actually formed, which makes this most useful when dealing with a large number of graphs.
So I use output=iterator in order to avoid costing large RAM when complete sequence of graphs is formed at once. Sometimes it even causes Maple to crash.