Talk:CRC-32: Difference between revisions

→‎Task goal: We are so going around in circles here
No edit summary
(→‎Task goal: We are so going around in circles here)
Line 38:
::::: Mostly concur with Donal, except that I do think seeing bit-twiddling solutions useful as well; it's best to use a language's idiomatic solution, but it's almost as important, in my opinion, to have an understanding of how it ''works.'' (Pragmatic vs theoretical arguments are abound, but it's often pragmatic to have an understanding of the theory) I'll retreat on my original recommendation of having polynomial-specific pages, though, and just suggest that different polynomials beyond the most common be optional entries; if a language has a shortcut for CRC32 of a particular polynomial, then that shortcut should be included as an additional solution. --[[User:Short Circuit|Michael Mol]] 15:28, 8 December 2011 (UTC)
:::::: (responding to [[User:Short Circuit|Michael Mol]]) -- I agree, you should use built-in functions. But they do not always exist, for example when using the HI-TECH C-compiler or Microchips C compilers. And if I would use a built in function, it would produce unessecary large code. It would be better if you had a good understanding of the function and make your own. We're programming in different enviroments. --[[User:Spekkio|Spekkio]] 19:14, 8 December 2011 (UTC)
::::::: And if I started writing my own from scratch it would produce unreasonably large (and slow) code. Delegating to a well-known library (which might or might not use special system instructions) is good. Most programmers — especially most on this site — don't use those compilers you mentioned; having a basic implementation is acceptable as a possible method, but it should not be the ''required'' method for something as well known as CRC32 which has many library implementations already. –[[User:Dkf|Donal Fellows]] 08:43, 9 December 2011 (UTC)
::::::: (responding to [[User:Short Circuit|Michael Mol]]) -- Or if the language has a shortcut for CRC polynomials in general... (The implementation I posted uses a library routine which currently supports running any 33 bit polynomial, where the leading bit is set, against a sequence of character literals.) --[[User:Rdm|Rdm]] 19:16, 8 December 2011 (UTC)
 
== Error correction ==
Anonymous user