Change the default -cformatter to dumbindent

A follow-up commit will remove the -cformatter flag entirely.

Formatting the generated C code is now a small fraction of where "wuffs
gen" spends its time.

----
$ # Before.
$ time wuffs gen > /dev/null
real	0m0.932s
user	0m0.837s
sys	0m0.187s

$ # After.
$ time wuffs gen > /dev/null
real	0m0.186s
user	0m0.170s
sys	0m0.069s

$ time wuffs gen -cformatter= > /dev/null
real	0m0.184s
user	0m0.170s
sys	0m0.059s
----
This commit is contained in:
Nigel Tao committed 2020-06-04 23:59:20 +10:00
1 parent d8cd72798a
commit 12b0f4c0bc
5 files changed
+3061 -4298

No files matched your search

+3
View File
@@ -23,6 +23,9 @@
// indenting nested blocks. The output isn't 'perfect', but it's usually
// sufficiently readable if the input already has sensible line breaks.
//
// See `cmd/dumbindent/main.go` in this repository for an example where
// `dumbindent` was 70 times faster than `clang-format`.
//
// There are no configuration options (e.g. tabs versus spaces).
//
// Known bug: it cannot handle /* slash-star comments */ or multi-line strings