PDSeparation.toRGB() isn't optimized yet. It is easy to optimize because it is a single item color. However we can't use a float key like in image conversion (which is optimized) because the method is called by shading, so there may be an infinite number of keys and not just 256. Thus we'll multiply with 255, cast to int and use that as key. Due to the different intervals, the map can't be shared with the map from the two other conversions in the class. It isn't needed either because the PDSeparation objects are usually different, even if it is the same indirect object in the PDF.
This optimization speeds up the rendering of PDF.js issue 8500, it renders in 66 seconds instead of 100. When rendering all my test files on my fast PC, overall time (excluding the mentioned file) gets lowered by 10 seconds, so we save up to 160 seconds somewhere.