| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
commit b1570a8c693a550a1fbe57872982146b56066aea
|
| |
|
| |
|
| |
|
|
|
|
|
| |
reverseImplicitRules, byPrefix, bySuffix
reverse
|
| |
|
|
|
|
| |
implement ruleTrie for implicit rules
|
| |
|
| |
|
|
|
|
|
|
| |
repo/android$ kati -ninja
...
*** No rule to make target "out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/export_includes", needed by "out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/import_includes".
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conversion from value to interface is more expensive than
conversion from pointer to interface.
package main
import "testing"
type I interface {
String() string
}
type val struct {
s string
}
func (v val) String() string { return v.s }
type ptr struct {
s string
}
func (p *ptr) String() string { return p.s }
func BenchmarkT2IForValue(b *testing.B) {
var intf I
for i := 0; i < b.N; i++ {
intf = val{"abc"}
}
_ = intf
}
func BenchmarkT2IForPtr(b *testing.B) {
var intf I
for i := 0; i < b.N; i++ {
intf = &ptr{"abc"}
}
_ = intf
}
% go test -bench . a_test.go
testing: warning: no tests to run
PASS
BenchmarkT2IForValue 20000000 90.9 ns/op
BenchmarkT2IForPtr 20000000 76.8 ns/op
ok command-line-arguments 3.539s
|
| |
|
|
|
|
| |
rename Log to Logf, since it takes format string in the first argument.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicitRules are categolized by
implicitRules - for pattern=% no prefix,suffix.
iprefixRules - for pattern=<prefix>% may be with suffix.
isuffixRules - for pattern=%<suffix> no prefix.
implicitRules are always checked with canPickImplicitRule.
iprefixRules is sorted by output pattern prefix, and only checked
for the prefix matched rules.
isuffixRules is sorted by output pattern suffix (reverse string),
and only checked for the suffix matched rules.
|
|
|
|
| |
This reverts commit 020ee1552626ac27168c3120ffb7f4403e5a7616.
|
|
|
|
|
| |
in populateRule, find implicit rules for outputs, so
just check such implicit rules in pickRule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
outputPatterns should be <prefix>%<suffix>.
It is waste to find % in every time.
parse outputPattern as pattern (<prefix>, <suffix>) and use it.
before:
repo/android.sh kati -c # with cpuprofile
82.04s
canPickImplicitRule 27.17s (34.34%)
matchPattern 19.11s (23.29%) out of the above
strings.IndexByte 16.96s (20.67%) out of the above
after:
repo/android.sh kati -c # with cpuprofile
64.04s
canPickImplicitRule 8.08s (12.62%)
pattern.match 3.45s (5.39%)
|
| |
|
| |
|
| |
|
|
|
|
| |
Only leading './'s should be stripped.
|
|
Now the dependency graph is constructed by dep.go
|