As an adjective, it means completely without mistakes or flaws. As a verb, it means to improve something until it is as good as it can possibly be.
From Latin “perfectus,” meaning “completed, finished, made thoroughly,” from “per-” (completely) + “facere” (to make). It originally meant something fully done, not necessarily flawless.
Try Another Word