Integer-to-ASCII algorithm (x86 assembly)
There are all sorts of things that LOOK like they should perform better, but I can only get a tiny bit of improvement.  And that may disappear (or worsen) on other hardware:

    mov ebx, 0xCCCCCCCD             
    xor rdi, rdi

.loop:
    mov ecx, eax                    ; save original number

    mul ebx                         ; divide by 10 using agner fog's 'magic number'
    shr edx, 3                      ;

    mov eax, edx                    ; store quotient for next loop

    lea edx, [edx*4 + edx]          ; multiply by 10
    shl rdi, 8                      ; make room for byte
    lea edx, [edx*2 - '0']          ; finish *10 and convert to ascii
    sub ecx, edx                    ; subtract from original number to get remainder

    lea rdi, [rdi + rcx]            ; store next byte

    test eax, eax
    jnz .loop 


The 2 changes are:


Move shl rdi to a 'better' place
Use lea instead of or to set rdi