Comment by jiggawatts

Comment by jiggawatts 2 days ago

3 replies

One of the best ways to measure code complexity is to zip up the source code. This eliminates a lot of the redundancies and is a more direct measure of entropy/complexity than almost anything else.

By that metric, jpeg-xl is about 4x the size of the jpeg or png codebase.

account42 a day ago

Your method would still judge well-documented code with lots of intermediate variables as more complex than undocumented code golf soup.

tkfoss 2 days ago

Interesting approach

  • jiggawatts 2 days ago

    It comes from the "intelligence is a form of compression" hypothesis that has been floating around in the ML space. Also, with a good compression algorithm it is a fairly direct measure of entropy, which is quite well correlated with what a developer might consider code size and/or complexity.