This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, libgfortran] Better format hash function


Janne Blomqvist wrote:
Hi,

the attached patch replaces the existing (too?) simple string hash
function with an almost equally simple but supposedly pretty well
working one by D.J. Bernstein.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk?


Attached is a text file containing an extraction of all format strings from the gfortran.dg testsuite. I was planning to start with this and do some actual testing of the hash function so that we could objectively proceed with the tweaks.

Unfortunately, I have not had much time to proceed with this and I thought NEWUNIT is a higher priority for me. The file was extracted with a Python script. I was hoping to add to the test set the NIST suite as well as others to try to get a representative sampling. I doubt that gfortran.dg is very representative, but it is a starting place.

Regards,

Jerry
'("#",A,"#")'
'(A)'
'(A)'
'(A)'
'(i5)'
'(i5)'
'(b0)'
'(a,i0,a)'
'(o0)'
'(a,i0,a)'
'(z0)'
'(a,i0,a)'
'(b0)'
'(a,i0,a)'
'(o0)'
'(a,i0,a)'
'(z0)'
'(a,i0,a)'
'(b0)'
'(a,i0,a)'
'(o0)'
'(a,i0,a)'
'(z0)'
'(a,i0,a)'
'(10f8.3)'
'(10f8.3)'
'(10f8.3)'
'(a)'
'(a)'
'(a)'
'(i6, (t7, 6i2))'
'(i4)'
'(i2.2)'
'(3X, A, T1, A,/)'
'(A2,1X,A2)'
'("hello"/"world")'
'("hello",t1,"HELLO",1x,"!"/"world",tl12,"WORLD")'
"(n)"
"(n)"
'(a)'
'(a)'
'(80I1)'
"(1X,a,'xyz')"
"(1X,a,'xyz')"
'(2A3)'
'(F0.1)'
'(2hi=,i3)'
'(2hi=,i3)'
'(2hi=,i3)'
'(A, Q, A)'
'(A)'
'(A)'
'(A)'
'(A)'
'(A)'
'("simple  = ",i5)'
'("derived = ",i5)'
'(80a)'
'(80a)'
'(80a)'
'(80a)'
'(10I4)'
'(10I4)'
'(A)'
'(80a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3)'
'(A,T2,A)'
'(6A)'
'(a)'
'(a)'
'(A)'
'(A)'
'(A)'
'(g20.14)'
'(6a1)'
"(A)"
'(6A)'
'(6A)'
'(6A)'
'(6A)'
'(2(e12.4e5, 2x))'
'(2(e12.4e5, 2x))'
'(f4,a6)'
'(d4,a6)'
'(e10.4)'
'(e10.4)'
'(e10.4)'
'(e10.4)'
'(A, Q, A)'
'(Q)'
'(4I2)'
'(A)'
'(A)'
'(A)'
'(A)'
'(A)'
'(Z4)'
'(Z5)'
'(Z9)'
'(Z17)'
'(Z2)'
'(Z8)'
'(B65)'
'(O4)'
'(2A)'
'(2A)'
'(2A)'
'(I4)'
'(I5)'
'(i0)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
"(g0,g0,g0)"
'(g0,g0,g0)'
'(5(a))'
'(10I5)'
'(a)'
'(a)'
'(a)'
'(80I1)'
"(4I4)"
"(4I4)"
'(I2)'
"(a)"
'(10f8.3)'
'(10f8.3)'
'(10f8.3)'
'(10f8.3)'
'(F12.5)'
'(F15.5)'
'(A)'
'(10A1)'
'(10A1)'
'(I4)'
'(I4)'
'(I4)'
'(ES12.3)'
'(EN12.3)'
'(9F9.5)'
'(9F9.5)'
'(18F9.5)'
'(18F9.5)'
'(f10.3,s,f10.3,sp,f10.3,ss,f10.3)'
'(f10.3,dc,f10.3,dp,f10.3)'
'(a)'
'(a)'
'(f9.2,1x,f8.2,2x,f11.7)'
'(100i1)'
'(100i1)'
'(f16.10)'
'(F4.1)'
'(SS,F4.1)'
'(SP,F4.1)'
'(A)'
'(2A)'
'(2A)'
'(A,$)'
'(A)'
'(A)'
'(            NaN,            NaN)'
'(            NaN,            NaN)'
'(      +Infinity,      -Infinity)'
'(  0.0000000    , -0.0000000    )'
'(4(a,/),a)'
'(a)'
'(T20,A3,  T1,A4,  T5,A2,  T7,A2,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9 8 7 6")'
'(6F8.3)'
'(6F8.3)'
'(6F8.3)'
'(a)'
'(a)'
'(a)'
'(a)'
'(i12)'
"(A)"
"(A)"
"(I2)"
'(10I4)'
'(10I4)'
'(10I4)'
'(10I4)'
'(10I4)'
'(10I4)'
'(10I4)'
'(10I4)'
'(9F9.5)'
'(9F9.5)'
'(9F9.5)'
'(9F9.5)'
'(18F9.5)'
'(18F9.5)'
'(18F9.5)'
'(18F9.5)'
'(F40.35)'
'(F40.35)'
'(F15.10)'
'(F15.10)'
'(F15.10)'
'(F15.10)'
'(F15.10)'
'(F40.35)'
'(F15.10)'
'(F15.10)'
'(F15.10)'
'(F15.10)'
'(F15.10)'
'(F20.15)'
'(F20.15)'
'(G20.10E5)'
'(G20.10E5)'
'(F20.15)'
'(F20.15)'
'(G20.10E5)'
'(G20.10E5)'
'(o0)'
'(A,Z8)'
'(A,Z8)'
'(A,Z8)'
'(A)'
'(A)'
'(1P,E13.5)'
'(E13.5)'
'(F15.5)'
"(' (', F15.5, ',' F15.5, ') ')"
'(a,1x,(t7, 3a))'
'(a)'
'(2hi=,i3)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(a)'
'(A,2X)'
'(A)'
'(A)'
'(TL2,A)'
'(a)'
'(A)'
'(A)'
'(A)'
'(a)'
"(i22)"
'(5a16)'
'(i3)'
"(e9.2)"
"(d9.2)"
'(4a1)'
'(4a1)'
'(4i2)'
'(4i2)'
"(a,t1,a,a)"
"(a,t1,a)"
"(a)"
"(a)"
"(a)"
"(2f5.3)"
"(a" // ")"
"(f5.3)"
"(g0,g0,g0)"
'(g0,g0,g0)'
'(1x,a,g0,a)'
"(g0,g0,g0,g0)"
"(g0,g0,',',g0,g0)"
"(1.2345001,2.4567001)"
'(A)'

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]