If this is the code you are referring to that you DOUBT my code can beat, then you're wrong. I would be willing to bet a lot of money that mine still executes faster than that, but only because of how vb compiles that to native code and its heavy use of the vbruntime. My class may LOOK bloated, but in fact the code that actually performs the CRC calculation is quite compact compared to what VB would spit out.Code:For lIdx = 0 To lSize - 1 lOutputCrc32 = (((lOutputCrc32 And &HFFFFFF00) \ &H100) And &HFFFFFF) Xor (m_lCrc32Table((lOutputCrc32 And &HFF) Xor uCtx.baInStream(lOffset + lIdx))) Next




Reply With Quote