Should I defrag my SSD before creating a partition for Boot Camp? I have a 500GB SSD in my MacBook Pro. I have been using my laptop for over three years - and it was migrated using Migration Assistant from a previous laptop that I had been using for five years before that, so there is probably a lot of crud accumulated.

I have manually cleaned up a lot of space - I have about 390GB free on this hard drive now. 

I want to set up Boot Camp to dual boot into Windows, and will crate a partition as part of that process.

I know that HFS+ automatically defragments files normally, but only those less than 20mb.

I also know that SSDs do not need to be defragmented, as there is no performance penalty to fragmentation. I know that the process of defragmentation may in fact be detrimental, since an SSD only has a certain limit of writes in it's usable life, and defragmentation involves reading data for one place on the drive and writing it to another.

I have a licenced copy of iDefrag from a long time ago when I had spinning platter hard drives and worked with large video files. 

So, my question is, is there an advantage to defragmenting the drive? To move all data into one part of the drive? As a once-only thing, only in preparation of partitioning the drive?
The Boot Camp Assistant will move any file (if any) which may reside in your future Windows partition to a appropriate position in your then shrinked Mac partition before creating unallocated disk space in the repartitioning process.
Therefore there is absolutely no need to defrag in the forefront.
Please read Do partitions on SSDs map to physical addresses?

Or with other words:

A SSD works like an Amazon distribution hub:  

  

and a HD like Walmart:



If both of them want to sell a new product (let's say windows) Amazon just has to find empty boxes to stack all the different windows. The controller knows where they are. However Walmart has to free up a whole section to present all windows at the same place for the sake of a convenient shopping experience. ;-)