Opening an issue based on this discussion: JuliaMath/FixedPointDecimals.jl#43 (review)
In our code, fldmod isn't inlining. Where we are calling it, one of the arguments is a static compiler Const, and so the division could be optimized away (into a cheaper multiplication and bitshift -- explanation here: JuliaMath/FixedPointDecimals.jl#43 (comment)), but it isn't able to because the non-inlined fldmod presents a function barrier that prevents the compiler from knowing one of the arguments is a Const.
fldmod is such a simple function, so i'm surprised it wasn't inlining anyway. Would it make sense to mark this as @inline in Base? If you think so, i can send a PR to do it.