XRF analysis allows for quick and accurate evaluation of chemical composition of wide range of materials, and is actively used in different fields of science and industry. The accuracy of a measurement depends on number of counts recorded to spectrum, and can be improved either by extending the measurement time, which is unwelcome especially when analyzing a large amount of samples, or by increasing the count rate of spectrometer. The latter however leads to parasitic effects due to pulse pile-up caused by detectors finite resolving time. When acquiring XRF spectrum at high count rates with semiconductor detectors pulse pile-up leads to distortion of recorded spectrum, in particular to appearance of so-called pile-up peaks. Pile-up peaks appear due to detector being unable to separate two or more incident quanta arriving in time interval less than detectors resolving time, and recording them as a single quantum with energy that equals to sum of incident quanta energies. If not accounted for pile-up peaks may lead to quantitative and qualitative errors while making composition calculations based on the recorded spectrum. In this article the statistic of pile-up peaks in XRF spectra, their dependence on spectrum acquisition parameters and ways of improvement of pulse pile-up rejection algorithms are considered. Experimental data was acquired using Elvatech Prospector 3 spectrometer. A high dependency of spectrometers resolving time on quanta energies was observed. Based off experimental data an improvement to pile-up rejection algorithm was proposed.