I recently had to do everything I could think of to keep my aging fort from playing so slowly that I had to abandon it.
The trick is to find what your computer is capable of and stay under it.
For instance, my computer can handle 350 dwarves in a simple fort on a small embark so long as nearly all of them are in the military and training. The moment they do something else - including fighting - the fps crashes horribly.
Or, I can have 200 dwarves with a few pets and livestock - less than 20 - on a 3 by 3 or 3 by 4 embark with a waterfall and have it run at speeds that don't make me abandon the fort because they are so bad.
Since the number of dwarves seems to be the single biggest cause of FPS drop I measure the other causes in terms of them. For instance the larger embark costs me 10 or 15 dwarves, but I like the room, I usually try to get a couple different biomes.
Cave levels with no water don't hurt the fps as much because they don't turn into horrible mushroom caves over time, or only slowly.
Huge water projects can be a drain on FPS, but don't have to be. If you connect a single waterfall to a short path from a river and have a direct exit for the water, and the waterfall falls through open space, you get very little FPS drop. Make that same waterfall fall through hallways and grates and it gets slightly worse, but still not much.
Having lots of trees causes some FPS drop because they constantly try to grow. Having rippling ponds after rainstorms causes a small but detectable drop. I tend to build roads and paved areas around constructions to cut down on the number of trees, and floor over ponds to speed up FPS.
Animals in cages cause less of a drop than ones running loose, but they still count. If you have hundreds of animals in cages, your fort will run faster without them.
Invaders seem to count exactly as much as dwarves, so when a massive siege shows up, your FPS is going to take a hit, especially if yours was finely balanced to begin with.
Stockpiles
Having a few thousand things in your stockpile isn't going to hurt your FPS much if any. A semi dedicated builder type player might easily create 10,000 stone or tens of thousands. That's going to add up eventually. A really crazy builder digging on a massive scale could have 100,000 stones on their hands or much more. At this point it's definitely going to make a difference and I'd recommend deleting some of it out of your world.
Your mileage may vary.