Strip single-predicate any/all instead of extracting
Rather than extracting every any/all into their own classifications, eliminate them (and replace them with their body) if they contain only one predicate. This is most likely to happen after template expansion, and there were an alarming number of them in our system. Stripping them out of one of our programs saved ~0.2MiB of output, and removed many intermediate classifications. It removed ~1,075 lines, which should correspond closely to the actual number of classifications. Discovering this required stripping the template barriers, which was done in a previous commit. Unfortunately, the performance improvement from this wasn't significantly, largely because of the nondeterminisim of GC, which can easily mask the gains. But a new line `v8::internal::FixedArray::set(int, v8::internal::Object)` appeared in the profiler output, making me wonder whether the JIT is starting to understand more interesting properties of the system. `mprotect` and `v8::internal::heap_internals::GenerationalBarrier` also appeared, which are related to GC.master
parent
2d519947f7
commit
8e457dab34
|
@ -304,10 +304,13 @@
|
|||
</template>
|
||||
|
||||
|
||||
<template mode="preproc:class-groupgen" priority="9"
|
||||
match="lv:any[ not( element() ) ]
|
||||
|lv:all[ not( element() ) ]">
|
||||
<!-- useless; remove -->
|
||||
<!--
|
||||
Not only should we not generate a group for single-predicate any/all, but
|
||||
we should remove it entirely.
|
||||
-->
|
||||
<template mode="preproc:class-groupgen" priority="7"
|
||||
match="(lv:any|lv:all)[ count( lv:* ) lt 2 ]">
|
||||
<apply-templates mode="preproc:class-groupgen" />
|
||||
</template>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue