[Development] Qt 5.9's new garbage collector documentation? + root_ptr

Thiago Macieira thiago.macieira at intel.com
Thu Jul 13 06:13:38 CEST 2017


On quarta-feira, 12 de julho de 2017 20:54:54 PDT Phil Bouchard wrote:
> On 07/12/2017 10:28 PM, Thiago Macieira wrote:
> > On quarta-feira, 12 de julho de 2017 12:34:35 PDT Phil Bouchard wrote:
> >> I don't know about you but a minimalist version of g++ embedded inside
> >> the
> >> browser could be beneficial big time.
> > 
> > Such a thing exists, it's called JIT.
> 
> I was reading the Wiki page:
> https://en.wikipedia.org/wiki/Just-in-time_compilation
> 
> And it says:
> "thus in theory JIT compilation can yield faster execution than static
> compilation"
> 
> But in practice a g++ compilation sequence followed by execution still
> is 1.8 times faster in the aforementioned test.  Maybe if you have
> pieces of code that are never executed then JIT would have a lead but
> serious/game engines for example stresses 100% of the code as far as I know.

That's not a fair comparison. First of all, the quote from Wikipedia is saying 
"in theory". That's because the JIT can actually optimise based on actual 
execution, the same way that PGO can do it.

Second, you're comparing one case.

Third, only 1.8 times faster? That's actually a very impressive JIT. I'd have 
expected a much worse number.

> The problem with JIT is its support also.  You need an army of coders to
> support the conversion from bytecode to assembly language, updates, etc.

The same can be said about the compiler. In the past year, there have been 
7700 commis by 164 different people in the GCC repository. This does not 
include binutils.

> Anyway I'm deviating from QNodePtr but I just don't understand the hype
> about JIT when it doesn't seem it has been compared to a Javascript
> compiler because none exists up to now.

JavaScript can't be entirely compiled since the types and behaviours of 
variables can change at runtime. And then there's the "eval" command.

> > There's also a tool to precompile a QML file. You should compare to that.
> 
> I know QML files can be compiled but I think the Qt Quick Compiler is
> being replaced by something else right now.  I'll have to investigate.

It's not.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list