[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Continuing deboostification with removing dependency on Boost.
From: |
Greg Chicares |
Subject: |
Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex |
Date: |
Sun, 30 May 2021 20:12:11 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 |
On 5/30/21 11:43 AM, Greg Chicares wrote:
> [...] couldn't we parallelize that with a patch like [untested]...
Tested patch below. It's not polished, but it's good enough for a
demonstration. First, 32-bit msw (wine):
...without patch, for reference:
/opt/lmi/src/lmi[0]$time make $coefficiency check_concinnity >/dev/null
make $coefficiency check_concinnity > /dev/null 10.10s user 2.30s system 299%
cpu 4.136 total
...and with the patch below [skip to "Summarized"]:
/opt/lmi/src/lmi[0]$rm .concinnity/*
zsh: sure you want to delete more than 100 files in
/opt/lmi/src/lmi/.concinnity [yn]? y
/opt/lmi/src/lmi[0]$time make $coefficiency check_concinnity >/dev/null
make $coefficiency check_concinnity > /dev/null 33.51s user 36.86s system 97%
cpu 1:12.35 total
/opt/lmi/src/lmi[0]$time make $coefficiency check_concinnity >/dev/null
make $coefficiency check_concinnity > /dev/null 7.28s user 2.26s system 768%
cpu 1.242 total
And here's 64-bit GNU/Linux (after 'rm .concinnity/*' as above):
/opt/lmi/src/lmi[0]$time make $coefficiency check_concinnity >/dev/null
make $coefficiency check_concinnity > /dev/null 9.81s user 2.40s system 338%
cpu 3.608 total
/opt/lmi/src/lmi[0]$time make $coefficiency check_concinnity >/dev/null
make $coefficiency check_concinnity > /dev/null 14.75s user 3.62s system 188%
cpu 9.719 total
/opt/lmi/src/lmi[0]$time make $coefficiency check_concinnity >/dev/null
make $coefficiency check_concinnity > /dev/null 7.39s user 2.34s system 875%
cpu 1.111 total
Summarized timings, with no changes in tested files so that the
last 'with patch' numbers show how long it takes to do nothing:
linux msw
without patch 4.136 4.136
with patch 9.719 72.35 empty .concinnity/ directory
with patch 1.111 1.242 fully populated .concinnity/
Middle row: the 'wine' startup cost is measurably overwhelming.
But nobody ever really needs to do this with 'wine'.
The new '.concinnity/' directory is a bother. With boost::regex,
I don't like this change: I'd rather spend three or four extra
seconds than go to the trouble of setting up and maintaining an
extra directory, and of polishing this patch. I'd view this
sentinel technique as a last resort, which merits further
consideration only if we can't match boost::regex's speed without
using boost (but we anticipate that compile-time regexes will
obviate that).
> ...thereby using 'make' to take care of parallelism
Here's the patch tested above:
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
diff --git a/GNUmakefile b/GNUmakefile
index f08c70e0a..bbd74a1dd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -458,8 +458,26 @@ custom_tools:
prefascicle_dir ?= $(srcdir)
xml_files := $(wildcard $(addprefix $(prefascicle_dir)/,*.cns *.ill *.xml
*.xrc *.xsd *.xsl))
+check_concinnity_files := \
+ $(sort \
+ $(addsuffix .check_concinnity,\
+ $(addprefix $(prefascicle_dir)/.concinnity/,\
+ $(notdir \
+ $(wildcard $(prefascicle_dir)/* \
+ ) \
+ ) \
+ ) \
+ ) \
+ ) \
+
+# .PHONY: %-concinnity-check
+%.check_concinnity:
+ @-cd $(prefascicle_dir) \
+ && $(PERFORM) $(TEST_CODING_RULES) $(subst /.concinnity,,$*) \
+ && $(TOUCH) $@
+
.PHONY: check_concinnity
-check_concinnity: source_clean custom_tools
+check_concinnity: source_clean custom_tools $(check_concinnity_files)
@$(TOUCH) --date=$(yyyy)0101 BOY
@$(TOUCH) --date=$(yyyymm)01 BOM
@$(TOUCH) --date=$(yyyymmdd) TODAY
@@ -501,6 +519,8 @@ check_concinnity: source_clean custom_tools
|| $(ECHO) "... in file $$z"; \
done;
@$(ECHO) " Miscellaneous problems:"
+
+erase-me:
@-cd $(prefascicle_dir) && $(PERFORM) $(TEST_CODING_RULES) *
################################################################################
-->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8--
- [lmi] Continuing deboostification with removing dependency on Boost.Regex, Vadim Zeitlin, 2021/05/27
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Vadim Zeitlin, 2021/05/28
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Greg Chicares, 2021/05/28
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Vadim Zeitlin, 2021/05/28
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Greg Chicares, 2021/05/28
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Vadim Zeitlin, 2021/05/28
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Greg Chicares, 2021/05/30
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Vadim Zeitlin, 2021/05/30
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Greg Chicares, 2021/05/30
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex,
Greg Chicares <=
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Vadim Zeitlin, 2021/05/30
- Re: [lmi] Continuing deboostification with removing dependency on Boost.Regex, Greg Chicares, 2021/05/31