Searching \ for 'Is Hitech C deliberately slugging code in the free' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/language/index.htm?key=c
Search entire site for: 'Is Hitech C deliberately slugging code in the free'.

Truncated match.
PICList Thread
'Is Hitech C deliberately slugging code in the free'
2009\07\02@140714 by Mike Harrison

flavicon
face
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.



2009\07\02@142926 by Bob Blick

face
flavicon
face
On Thu, 02 Jul 2009 19:06:33 +0100, "Mike Harrison"
<spam_OUTmikeTakeThisOuTspamwhitewing.co.uk> said:

>  "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.

I have an LCD terminal project on my website, and people have been
telling me it doesn't fit in the chip using the new free version. It fit
fine with the old free version.

Also, I haven't noticed "OCG" making any improvement over my older
"non-free", "pre-PRO" version.

This all started a few years ago. The non-free PRO compiler includes
"OCG" but does no better. The free version got way worse.

Now that Microchip has bought HiTech, things can only get better, it
would be hard for it to get worse!

Cheerful regards,

Bob

--
http://www.fastmail.fm - Email service worth paying for. Try it for free

2009\07\02@143249 by Ricardo de Azambuja

picon face
I have told then this (make the lite version better to the starter
developer) in the last road show, but they said if you bought the PRO
you will gain saving in memory and MIPS (producing some thousands uC)
so buying a poor uC and if you just need to produce one uC project,
you can afford buy a expensive uC (because of the bad code
optmization).


[ ]s

---------------------------------
Ricardo de Azambuja
http://www.azamec.com.br



On Thu, Jul 2, 2009 at 3:06 PM, Mike Harrison<.....mikeKILLspamspam@spam@whitewing.co.uk> wrote:
{Quote hidden}

>

2009\07\02@150432 by Rikard Bosnjakovic

picon face
On Thu, Jul 2, 2009 at 20:06, Mike Harrison<mikespamKILLspamwhitewing.co.uk> wrote:

>  "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?

Basically it means "Pay us loads of money and we will give you less
code". Here's what I got with your code, using a licensed Hi-Tech
C-compiler:

10:                    irtmrl += bittime2;
  3F5    302A     MOVLW 0x2a
  3F6    07A1     ADDWF 0x21, F
12:                    irtmrl++;
  3F8    0AA1     INCF 0x21, F



--
- Rikard - http://bos.hack.org/cv/

2009\07\02@153104 by Lucas

flavicon
face
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 removed}

2009\07\02@165549 by Herbert Graf

picon face
On Thu, 2009-07-02 at 15:30 -0400, Lucas wrote:
> 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...

Sly marketing? Frankly, if their free version went from doing these
optimizations to not doing them (honestly, a compiler that doesn't take
i++ and output INCF is BROKEN in my mind), and yet nothing was said to
that effect, I would call it at best sleezy, at worst something much
worse.

Yes, it's "free" and we don't really have a right to complain. That
said, it does show to be what kind of company they are, and it's not
someone I'd be willing to give money to based on this.

TTYL

2009\07\06@073025 by Michael Rigby-Jones

flavicon
face


{Quote hidden}

The description of Lite mode on the HiTech website clearly states
optimisations are disabled.

I think people are missing the point, if you wish to evaluate the
compiler for a commercial project, you can do so, with full
optimisations enabled for (I think) 45 days.  The Lite mode is really
for simple hobbyist projects where the ability to use any device often
outweighs the bloated code it produces.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\07\07@184353 by Chris McSweeny

picon face
On Mon, Jul 6, 2009 at 12:30 PM, Michael
Rigby-Jones<Michael.Rigby-Jonesspamspam_OUToclaro.com> wrote:
> The description of Lite mode on the HiTech website clearly states
> optimisations are disabled.

Though for the code samples in the OP, it's not so much that
optimisations are disabled, but that unoptimisations are enabled! It
looks like rather than not including stuff they've actually gone to
some effort to make the free one worse. They are of course at liberty
to do this, but whilst I accept the existence of a demo version, it
does seem slightly risky business strategy when somebody might well
make a judgement on your product from the free version and never
bother to download the demo.

2009\07\07@192644 by Terry Harris

picon face
On Tue, 7 Jul 2009 23:43:52 +0100, you wrote:

>does seem slightly risky business strategy when somebody might well
>make a judgement on your product from the free version and never
>bother to download the demo.

The compiler in lite mode issues a diagnostic like this

Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 52% smaller than in Lite mode.
The HI-TECH C PRO compiler output for this code could be 22 words smaller.
See http://microchip.htsoft.com/portal/pic_pro for more information.

Every time. Is someone smart enough to look at and understand the generated
code going to be too dim to look at and understand this diagnostic?


2009\07\07@200425 by John Gardner

picon face
I agree with Bob.

"By their deeds ye shall know them...".

Those that feel such behavior is acceptable are entitled
to their opinion.

Jack

2009\07\08@021428 by Wouter van Ooijen

face picon face
I totally fail to see why a company (or a person, or organization, or
whatever) should be blamed by giving something away for free. It might
be crappy in some way, but they are totally open about that! Use it at
your own free will, or ignore it. Or better: write something better
yourself, and provide that for free!

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2009\07\08@032409 by William \Chops\ Westfield

face picon face

On Jul 7, 2009, at 11:13 PM, Wouter van Ooijen wrote:

> Or better: write something better yourself, and provide that for free!

You did!

Thank you!

BillW

2009\07\08@033824 by Dario Greggio

face picon face
Chris McSweeny ha scritto:
> On Mon, Jul 6, 2009 at 12:30 PM, Michael
> Rigby-Jones<@spam@Michael.Rigby-JonesKILLspamspamoclaro.com> wrote:
>> The description of Lite mode on the HiTech website clearly states
>> optimisations are disabled.
>
> Though for the code samples in the OP, it's not so much that
> optimisations are disabled, but that unoptimisations are enabled! It
> looks like rather than not including stuff they've actually gone to
> some effort to make the free one worse. e free version and never
> bother to download the demo.

Hmmm, me and others have already pointed out that what we are seeing now
is "possibly" the raw output of the compiler , "unoptimized" .

2009\07\08@040909 by Wouter van Ooijen

face picon face
>> Or better: write something better yourself, and provide that for free!
>
> You did!

I am not sure my original Jal would qualify as 'better', but the current
Jal (rewritten from scratch by Kyle York and much extended) is certainly
worth a look!

http://www.casadeyork.com/jalv2/
http://code.google.com/p/jallib/

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2009\07\08@084703 by Carl Denk

flavicon
face
Not an area where I have much expertise, but sounds like the original
compiler was poorly done, and a lots of patches call optimizers are
added. I would think a good compiler, would do a good job, based on
individual lines or small groups of lines like a loop of code, and the
optimizer would look at more of a macro view, to eliminate duplicate
instructions, etc., say where a value is already in a register.

2009\07\08@092948 by Wouter van Ooijen

face picon face
> Not an area where I have much expertise, but sounds like the original
> compiler was poorly done, and a lots of patches call optimizers are
> added. I would think a good compiler, would do a good job, based on
> individual lines or small groups of lines like a loop of code, and the
> optimizer would look at more of a macro view, to eliminate duplicate
> instructions, etc., say where a value is already in a register.

It is not your area of expertise, but you seem to expect that your
conclusions are valid?

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2009\07\08@093045 by Michael Rigby-Jones

flavicon
face


> -----Original Message-----
> From: KILLspampiclist-bouncesKILLspamspammit.edu
> [RemoveMEpiclist-bouncesTakeThisOuTspammit.edu] On Behalf Of Carl Denk
> Sent: 08 July 2009 13:46
> To: Microcontroller discussion list - Public.
> Subject: Re: Is Hitech C deliberately slugging code in the
> free version..?
>
> Not an area where I have much expertise, but sounds like the
> original compiler was poorly done, and a lots of patches call
> optimizers are added.

As someone else mentioned, HiTech cover a range of very different target
devices so compiler design is likely to biased towards ease of
targetting different architectures rather than efficient
pre-optimisation code generation of a single target familly.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\07\08@103746 by Carl Denk

flavicon
face
More of an outsiders thoughts of a summary of the supposed experts, for
comment, that's why I noted up front my qualifications. :)
1: Should a compiler, do a reasonable job of generating code on a line
by line basis, or is this not expected if the targets are a mixed bag of
devices in a family?
2: When you specify a target device, should the compiler generate
different code, then for a different device? This is excluding hardware
specifics like ADC, EUARTS ,UARTS, etc. which I would assume be handled
correctly for the device.
3: Should the optimizer then take that code generated on a line by line
basis and improve it by eliminating duplicates, and unnecessary steps?

It appears numerous examples have been cited where the basic code
generated was less than optimal quality, and as pointed out code size
can be an issue, though I don't recall seeing actual numbers as to, how
much larger the code got.


Wouter van Ooijen wrote:
{Quote hidden}

2009\07\08@104531 by Ricardo de Azambuja

picon face
How to avoid C compilers problems?
- Write in assembly :D

[ ]s

---------------------------------
Ricardo de Azambuja


On Wed, Jul 8, 2009 at 11:37 AM, Carl Denk<spamBeGonecdenkspamBeGonespamwindstream.net> wrote:
{Quote hidden}

> -

2009\07\08@111146 by Wouter van Ooijen

face picon face
> More of an outsiders thoughts of a summary of the supposed experts, for
> comment, that's why I noted up front my qualifications. :)
> 1: Should a compiler, do a reasonable job of generating code on a line
> by line basis, or is this not expected if the targets are a mixed bag of
> devices in a family?

I see no reason why it should.

> 2: When you specify a target device, should the compiler generate
> different code, then for a different device? This is excluding hardware
> specifics like ADC, EUARTS ,UARTS, etc. which I would assume be handled
> correctly for the device.

If the devices are sufficiently different the code will be forced to be
different.

> 3: Should the optimizer then take that code generated on a line by line
> basis and improve it by eliminating duplicates, and unnecessary steps?

could, but not necessary

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2009\07\08@202632 by Gerhard Fiedler

picon face
Dario Greggio wrote:

> Chris McSweeny ha scritto:
>> On Mon, Jul 6, 2009 at 12:30 PM, Michael
>> Rigby-Jones<TakeThisOuTMichael.Rigby-JonesEraseMEspamspam_OUToclaro.com> wrote:
>>> The description of Lite mode on the HiTech website clearly states
>>> optimisations are disabled.
>>
>> Though for the code samples in the OP, it's not so much that
>> optimisations are disabled, but that unoptimisations are enabled! It
>> looks like rather than not including stuff they've actually gone to
>> some effort to make the free one worse. e free version and never
>> bother to download the demo.
>
> Hmmm, me and others have already pointed out that what we are seeing
> now is "possibly" the raw output of the compiler , "unoptimized" .

You really want to spoil the fun? :)

Gerhard

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...