« Return to Thread: Is Hitech C deliberately slugging code in the free version..?

RE: Is Hitech C deliberately slugging code in the free version..?

by Lucas Korytkowski :: Rate this Message:

Reply to Author | View in Thread

That's in-line with what I'm seeing here.  Both for the PIC and for the
PSoC.  Hi-Tech released a compiler for the PSoC a little back, the free
version is much worse than the ImageCraft compiler.  We're sticking with the
ImageCraft on the PSoC and a much older version of the C compiler for the
PIC just so our existing projects can still fit in the chips.

I always thought the Omniscient code generation would optimize similar code
segments where it would be more feasible to turn them into common
subroutines, silly me, it really meant not to generate code by randomly
inserting instructions. The Pro version of the compiler knows every possible
way to optimize the poor code that the lite version would generate, hence
the name.  Sly marketing...

Lucas



-----Original Message-----
From: piclist-bounces@... [mailto:piclist-bounces@...] On Behalf Of
Mike Harrison
Sent: July 2, 2009 2:07 PM
To: PICLIST@...
Subject: Is Hitech C deliberately slugging code in the free version..?

I've not used C on a PIC for a while - thought things were rtunning a bit
slowly on a 16F818 project. Looked at some code and was staggered by how
badly it was generating code for trivial operations A couple of snippets :

313:               irtmr1+=bittime2;   // bittime 2 is a constant, irtmr1 is
a global char
   090    300D     MOVLW 0xd
   091    00F2     MOVWF 0x72
   092    0872     MOVF 0x72, W
   093    07F8     ADDWF 0x78, F

Four instructions where two would do

314:               ircnt1++;
   094    3001     MOVLW 0x1
   095    00F2     MOVWF 0x72
   096    0872     MOVF 0x72, W
   097    07FC     ADDWF 0x7c, F

Four instructions where one would do.

 "Running this compiler in PRO mode, with Omniscient Code Generation
enabled, produces code which is typically 52% smaller than in Lite mode."

So does 'Omniscient Code Generation' just mean doing things properly?

I can't help but think that Microchip shipping something as poorly
performing as this, even for free, can't be doing them any favours winning
potential customers as it just makes the silicon look bad.



--
http://www.piclist.com PIC/SX FAQ & list archive View/change your membership
options at http://mailman.mit.edu/mailman/listinfo/piclist

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

 « Return to Thread: Is Hitech C deliberately slugging code in the free version..?