Been doing this since year 11 and I still do it now.
Just spam the whole thing out in one go then mark it. Marking takes a dedicated one hour or so to make sure I learn everything properly according to marking guidelines (in the case of prelim, HSC, maths at uni, etc). For my more dedicated courses, I mark by checking answers with others/solutions then redo any questions with mistakes from scratch. Still do the whole paper in one go though!
Also, in the case where you have the time, use feedback from one or two past papers as where your weaknesses lie. When you figure out your weaknesses, do other extra questions from textbooks or some other sources and consolidate your foundation for that weakness.
If you are cramming, might be worth cutting your losses and just keep doing past papers and hope for the best. If you have the extra time then don't let the weaknesses limit your final marks.