Integer: use own cache
Integer: use own cache

As was shown with gcd Memoizer is slow, and there were a lot of slow-path in
the old Integer.__new__

Timings:


        %timeit     %timeit
        Integer(1)  Integer(2)

old:    12 µs       12 µs
new:    3.3 µs      3.3 µs

kumarkrishna/sympy,asm666/sympy,skidzo/sympy,aktech/sympy,oliverlee/sympy,amitjamadagni/sympy,shikil/sympy,ChristinaZografou/sympy,postvakje/sympy,bukzor/sympy,vipulroxx/sympy,jamesblunt/sympy,jaimahajan1997/sympy,Vishluck/sympy,Davidjohnwilson/sympy,kumarkrishna/sympy,abhiii5459/sympy,abloomston/sympy,sahilshekhawat/sympy,Designist/sympy,skirpichev/omg,kevalds51/sympy,yukoba/sympy,maniteja123/sympy,shipci/sympy,postvakje/sympy,yukoba/sympy,ga7g08/sympy,VaibhavAgarwalVA/sympy,emon10005/sympy,cswiercz/sympy,hrashk/sympy,abhiii5459/sympy,AkademieOlympia/sympy,bukzor/sympy,AkademieOlympia/sympy,VaibhavAgarwalVA/sympy,Designist/sympy,iamutkarshtiwari/sympy,cccfran/sympy,sampadsaha5/sympy,cswiercz/sympy,Titan-C/sympy,sunny94/temp,kaushik94/sympy,mafiya69/sympy,madan96/sympy,pernici/sympy,wyom/sympy,Curious72/sympy,postvakje/sympy,cswiercz/sympy,pbrady/sympy,ChristinaZografou/sympy,madan96/sympy,dqnykamp/sympy,garvitr/sympy,Davidjohnwilson/sympy,Mitchkoens/sympy,fperez/sympy,maniteja123/sympy,skidzo/sympy,drufat/sympy,shikil/sympy,Curious72/sympy,rahuldan/sympy,meghana1995/sympy,souravsingh/sympy,diofant/diofant,wyom/sympy,dqnykamp/sympy,meghana1995/sympy,grevutiu-gabriel/sympy,lidavidm/sympy,asm666/sympy,shikil/sympy,souravsingh/sympy,kumarkrishna/sympy,aktech/sympy,atreyv/sympy,MridulS/sympy,jbbskinny/sympy,Shaswat27/sympy,wanglongqi/sympy,minrk/sympy,abhiii5459/sympy,Sumith1896/sympy,pandeyadarsh/sympy,chaffra/sympy,toolforger/sympy,toolforger/sympy,madan96/sympy,MridulS/sympy,garvitr/sympy,abloomston/sympy,yashsharan/sympy,debugger22/sympy,grevutiu-gabriel/sympy,kmacinnis/sympy,grevutiu-gabriel/sympy,dqnykamp/sympy,ahhda/sympy,moble/sympy,sahmed95/sympy,ga7g08/sympy,toolforger/sympy,sampadsaha5/sympy,ga7g08/sympy,Mitchkoens/sympy,iamutkarshtiwari/sympy,Sumith1896/sympy,Curious72/sympy,Titan-C/sympy,shipci/sympy,sunny94/temp,debugger22/sympy,jerli/sympy,Gadal/sympy,Arafatk/sympy,lindsayad/sympy,kaichogami/sympy,atsao72/sympy,atsao72/sympy,cccfran/sympy,liangjiaxing/sympy,ahhda/sympy,minrk/sympy,drufat/sympy,jaimahajan1997/sympy,beni55/sympy,farhaanbukhsh/sympy,souravsingh/sympy,yashsharan/sympy,kaichogami/sympy,lidavidm/sympy,garvitr/sympy,yashsharan/sympy,sahilshekhawat/sympy,emon10005/sympy,meghana1995/sympy,mcdaniel67/sympy,ryanGT/sympy,chaffra/sympy,atreyv/sympy,saurabhjn76/sympy,Titan-C/sympy,hazelnusse/sympy-old,cccfran/sympy,tovrstra/sympy,moble/sympy,hargup/sympy,jbbskinny/sympy,atsao72/sympy,Davidjohnwilson/sympy,sahmed95/sympy,jamesblunt/sympy,hrashk/sympy,MechCoder/sympy,farhaanbukhsh/sympy,Gadal/sympy,beni55/sympy,lidavidm/sympy,mcdaniel67/sympy,kmacinnis/sympy,aktech/sympy,pandeyadarsh/sympy,kevalds51/sympy,MechCoder/sympy,kevalds51/sympy,liangjiaxing/sympy,MridulS/sympy,jerli/sympy,AunShiLord/sympy,AunShiLord/sympy,bukzor/sympy,drufat/sympy,pbrady/sympy,kmacinnis/sympy,debugger22/sympy,Designist/sympy,sahilshekhawat/sympy,hargup/sympy,Arafatk/sympy,iamutkarshtiwari/sympy,jaimahajan1997/sympy,jbaayen/sympy,farhaanbukhsh/sympy,atreyv/sympy,oliverlee/sympy,jerli/sympy,sahmed95/sympy,rahuldan/sympy,sampadsaha5/sympy,Shaswat27/sympy,Vishluck/sympy,moble/sympy,srjoglekar246/sympy,Sumith1896/sympy,jbbskinny/sympy,hrashk/sympy,asm666/sympy,yukoba/sympy,lindsayad/sympy,ahhda/sympy,rahuldan/sympy,KevinGoodsell/sympy,MechCoder/sympy,wanglongqi/sympy,liangjiaxing/sympy,mafiya69/sympy,hargup/sympy,flacjacket/sympy,jamesblunt/sympy,wanglongqi/sympy,Gadal/sympy,kaichogami/sympy,emon10005/sympy,Vishluck/sympy,wyom/sympy,Shaswat27/sympy,AkademieOlympia/sympy,amitjamadagni/sympy,saurabhjn76/sympy,mafiya69/sympy,pbrady/sympy,mattpap/sympy-polys,skidzo/sympy,pandeyadarsh/sympy,Mitchkoens/sympy,hazelnusse/sympy-old,sunny94/temp,abloomston/sympy,mcdaniel67/sympy,vipulroxx/sympy,maniteja123/sympy,chaffra/sympy,kaushik94/sympy,vipulroxx/sympy,lindsayad/sympy,shipci/sympy,saurabhjn76/sympy,Arafatk/sympy,VaibhavAgarwalVA/sympy,ChristinaZografou/sympy,beni55/sympy,oliverlee/sympy,AunShiLord/sympy,kaushik94/sympy