[PATCH] Tunable guile@3.0.9t package

  • Open
  • quality assurance status badge
Details
2 participants
  • Dr. Arne Babenhauserheide
  • Ludovic Courtès
Owner
unassigned
Submitted by
Dr. Arne Babenhauserheide
Severity
normal
D
D
Dr. Arne Babenhauserheide wrote on 22 Mar 2023 22:19
(address . bug-guix@gnu.org)
87zg8479mo.fsf@web.de
Hi,


The attached patch adds a guile@3.0.9t package that enables CPU
architecture tuning for Guile and for a specialized libgc.

It creates new packages to avoid causing rebuilds.
From fbde1198a2386874e059faf8b3afdd09288bc7aa Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab@web.de>
Date: Wed, 22 Mar 2023 18:32:08 +0100
Subject: [PATCH] gnu: create tunable guile@3.0.9t that uses tunable bdw-gc

* gnu/packages/bdw-gc.scm (libgc/tunable): new derived package with
(tunable? . #t) property.
* gnu/packages/guile.scm (guile-3.0-latest/tunable): new derived package
with (tunable? . #t) property that uses libgc/tunable as propagated input.
---
gnu/packages/bdw-gc.scm | 8 ++++++++
gnu/packages/guile.scm | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index ae0d761ac3..a5a58da877 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -96,6 +96,14 @@ (define-public libgc
(license (x11-style (string-append home-page "license.txt")))))
+(define-public libgc/tunable
+ (package
+ (inherit libgc)
+ (properties
+ '((release-monitoring-url . "https://www.hboehm.info/gc/gc_source/")
+ (upstream-name . "gc")
+ (tunable? #t)))))
+
;; TODO: Add a static output in libgc in the next rebuild cycle.
(define-public libgc/static-libs
(package/inherit
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 2fd9b711ce..715f5c7a61 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -419,6 +419,28 @@ (define-public guile-3.0-latest
"GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
'())))))))
+(define-public guile-3.0-latest/tunable
+ (package
+ (inherit guile-3.0-latest)
+ (version "3.0.9t")
+ (source (origin
+ (inherit (package-source guile-3.0))
+ (uri (string-append "mirror://gnu/guile/guile-"
+ (string-delete #\t version)
+ ".tar.xz"))
+ (sha256
+ (base32
+ "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs guile-3.0-latest)
+ (replace "bdw-gc" libgc/tunable)
+ ))
+
+ (properties '((tunable? . #t) ;this is the point of this package
+ (timeout . 72000) ;20 hours
+ (max-silent-time . 36000))))) ;10 hours (needed on ARM
+ ; when heavily loaded)
+
;;; The symbol guile-3.0/fixed should be used when guile-3.0 needs fixes
;;; (security or else) and this deprecation could be removed.
(define-deprecated/public-alias guile-3.0/fixed guile-3.0/pinned)
--
2.39.2
The results of a benchmark are still not fully conclusive: regular Guile
seems to be slightly slower in the Geometric mean of all tests, but
there are benchmarks where a tuned Guile is slower.

Note that this is tuning for znver3 while I actually have znver4, but
support for the correct compile-target will only arrive with GCC 13.


To replicate the benchmarks:

echo guix pull --disable-authentication --allow-downgrades -u … # get the new packages

guix shell mercurial -- hg clone https://hg.sr.ht/~arnebab/wisp
guix shell git -- git clone https://github.com/ecraven/r7rs-benchmarks
cd r7rs-benchmarks

for N in {1..3}; do
guix shell --tune guile@3.0.9t -- ./bench guile all && mv results.Guile{,-tuned${N}}
guix shell guile@3.0.9 -- ./bench guile all && mv results.Guile{,-regular${N}}
sed -i 's/\+guile/+guiletuned/' results.Guile-tuned${N}
sed -i 's/\+guile/+guileregular/' results.Guile-regular${N}
done
grep -a -h '+!CSVLINE' results.Guile-{regular,tuned}* | sed 's/+!CSVLINE!+//' > all.csv
guix shell guile-wisp guile -- ../wisp/examples/evaluate-r7rs-benchmark.w ~/eigenes/Programme/r7rs-benchmarks/all.csv guiletuned
guix shell guile-wisp guile -- ../wisp/examples/evaluate-r7rs-benchmark.w ~/eigenes/Programme/r7rs-benchmarks/all.csv guileregular


My results with N in {1..2}, the Geometric mean:

Guile tuned has a slowdown of 1.03512801239189
Guile regular has a slowdown of 1.0504373210343294

This suggests that the regular Guile is 1.48% slower than tuned Guile.

Since I have no errorbars, I cannot say whether this is significant.


=== Guiletuned slowdown ===

(("bv2string:1000:1000:100" . 1.0)
("equal" . #f)
("mperm:20:10:2:1" . 1.146669471586088)
("gcbench:20:1" . 1.0197445340007967)
("sboyer:5:1" . 1.0398502157522214)
("nboyer:5:1" . 1.050828554948064)
("chudnovsky:50:500:50:1000"
.
1.0236854348323314)
("slatex:500" . 1.0063944149759714)
("scheme:100000" . 1.0689169431069399)
("quicksort:10000:2500" . 1.003088477529797)
("primes:1000:10000" . 1.041839283639136)
("peval:2000" . 1.0560148767561295)
("parsing:2500" . 1.0003564615141731)
("paraffins:23:10" . 2.0039145601078086)
("nqueens:13:10" . 1.0)
("mazefun:11:11:10000" . 1.034627134692567)
("maze:20:7:10000" . 1.001234149986604)
("matrix:5:5:2500" . 1.047237971262676)
("lattice:44:10" . 1.003284878892407)
("graphs:7:3" . 1.101724767552233)
("earley:1" . 1.0507663201957202)
("dynamic:500" . 1.0806476338778386)
("conform:500" . 1.0)
("compiler:2000" . 1.0973709486022507)
("read1:2500" . 1.0)
("wc:inputs/bib:50" . 1.0252716381981584)
("tail:50" . 1.070013760352806)
("cat:50" . 1.1006490143447183)
("sum1:25" . 1.0)
("string:500000:100" . 1.005448377967908)
("array1:1000000:500" . 1.017108880809611)
("ack:3:12:2" . 1.0343152722188402)
("simplex:1000000" . 1.0213054034897673)
("ray:50" . 1.0090968950973398)
("pnpoly:1000000" . 1.0091804774033606)
("pi:50:500:50:100" . 1.0)
("nucleic:50" . 1.0173803271423734)
("mbrotZ:75:1000" . 1.022665128035874)
("mbrot:75:1000" . 1.0)
("fft:65536:100" . 1.0)
("sumfp:1000000.0:500" . 1.0)
("sum:10000:200000" . 1.0028978038917624)
("fibfp:35.0:10" . 1.029590065926432)
("fibc:30:10" . 1.0072040559671238)
("fib:40:5" . 1.0023503962392322)
("ctak:27:16:8:1" . 1.0)
("cpstak:40:20:11:1" . 1.0)
("ntakl:40:20:12:1" . 1.046107228813898)
("takl:40:20:12:1" . 1.0327425092626041)
("tak:40:20:11:1" . 1.0)
("triangl:22:1:50" . 1.0143942222863194)
("puzzle:1000" . 1.2229189054254013)
("divrec:1000:1000000" . 1.0074179348861916)
("diviter:1000:1000000" . 1.043931078583493)
("destruc:600:50:4000" . 1.0240507947888393)
("deriv:10000000" . 1.0319784815172544)
("browse:2000" . 1.1070660842252487)
("bv2string:1000:1000:100" . 1.0338536673222782)
("equal" . #f)
("mperm:20:10:2:1" . 1.1881732405136267)
("gcbench:20:1" . 1.0)
("sboyer:5:1" . 1.0631408998092902)
("nboyer:5:1" . 1.0217971951625024)
("chudnovsky:50:500:50:1000" . 1.0)
("slatex:500" . 1.0)
("scheme:100000" . 1.0)
("quicksort:10000:2500" . 1.0543263325575605)
("primes:1000:10000" . 1.0067412573033894)
("peval:2000" . 1.0)
("parsing:2500" . 1.0)
("paraffins:23:10" . 1.0)
("nqueens:13:10" . 1.0176605905015021)
("mazefun:11:11:10000" . 1.037746391910457)
("maze:20:7:10000" . 1.0)
("matrix:5:5:2500" . 1.0200605013910409)
("lattice:44:10" . 1.0102542438570286)
("graphs:7:3" . 1.0384572473968816)
("earley:1" . 1.0)
("dynamic:500" . 1.0)
("conform:500" . 1.0091118513899833)
("compiler:2000" . 1.0)
("read1:2500" . 1.0599058441532945)
("wc:inputs/bib:50" . 1.0746142263219225)
("tail:50" . 1.0632740266035832)
("cat:50" . 1.0929665813153533)
("sum1:25" . 1.036061672363642)
("string:500000:100" . 1.0162155078942512)
("array1:1000000:500" . 1.0515376902103308)
("ack:3:12:2" . 1.0118706763775067)
("simplex:1000000" . 1.0164588830600216)
("ray:50" . 1.0)
("pnpoly:1000000" . 1.0)
("pi:50:500:50:100" . 1.045459192674658)
("nucleic:50" . 1.0017484672084827)
("mbrotZ:75:1000" . 1.0)
("mbrot:75:1000" . 1.0311423294990856)
("fft:65536:100" . 1.0504466238403414)
("sumfp:1000000.0:500" . 1.0091469248322233)
("sum:10000:200000" . 1.0)
("fibfp:35.0:10" . 1.0)
("fibc:30:10" . 1.1257119803649067)
("fib:40:5" . 1.0)
("ctak:27:16:8:1" . 1.0148864364373957)
("cpstak:40:20:11:1" . 1.011283388260497)
("ntakl:40:20:12:1" . 1.0)
("takl:40:20:12:1" . 1.007232975497366)
("tak:40:20:11:1" . 1.0362220583744437)
("triangl:22:1:50" . 1.022212297184504)
("puzzle:1000" . 1.2350889918747268)
("divrec:1000:1000000" . 1.0064081034755894)
("diviter:1000:1000000" . 1.0)
("destruc:600:50:4000" . 1.0)
("deriv:10000000" . 1.0061506030191765)
("browse:2000" . 1.0065279614595284))

=== Guiletuned Geometric Mean slowdown (successful tests / total tests) ===

1.03512801239189 (112 / 114)


=== Guileregular slowdown ===

(("bv2string:1000:1000:100" . 1.0674803047626884)
("equal" . #f)
("mperm:20:10:2:1" . 1.094739035540671)
("gcbench:20:1" . 1.0172414374269374)
("sboyer:5:1" . 1.0)
("nboyer:5:1" . 1.0)
("chudnovsky:50:500:50:1000"
.
1.1734845659670659)
("slatex:500" . 1.0239374916619306)
("scheme:100000" . 1.122700507430036)
("quicksort:10000:2500" . 1.0)
("primes:1000:10000" . 1.0)
("peval:2000" . 1.0088858652748092)
("parsing:2500" . 1.0418903162390507)
("paraffins:23:10" . 2.042048452193248)
("nqueens:13:10" . 1.0100153261373226)
("mazefun:11:11:10000" . 1.0)
("maze:20:7:10000" . 1.048959091743095)
("matrix:5:5:2500" . 1.0)
("lattice:44:10" . 1.0079437861216478)
("graphs:7:3" . 1.198135373192713)
("earley:1" . 1.0959681146976517)
("dynamic:500" . 1.16155735839947)
("conform:500" . 1.0119217370442324)
("compiler:2000" . 1.0306165278415973)
("read1:2500" . 1.0460552396933456)
("wc:inputs/bib:50" . 1.0)
("tail:50" . 1.0319054479289398)
("cat:50" . 1.0)
("sum1:25" . 1.034137468078866)
("string:500000:100" . 1.0)
("array1:1000000:500" . 1.0)
("ack:3:12:2" . 1.0057561961050057)
("simplex:1000000" . 1.0)
("ray:50" . 1.0438647708135202)
("pnpoly:1000000" . 1.0874091135942872)
("pi:50:500:50:100" . 1.0215934390378087)
("nucleic:50" . 1.0)
("mbrotZ:75:1000" . 1.052938347579755)
("mbrot:75:1000" . 1.0329378591712912)
("fft:65536:100" . 1.0189087888402792)
("sumfp:1000000.0:500" . 1.0482534106366277)
("sum:10000:200000" . 1.0289912283371638)
("fibfp:35.0:10" . 1.033671691949834)
("fibc:30:10" . 1.178850020182939)
("fib:40:5" . 1.024466514102094)
("ctak:27:16:8:1" . 1.1039955311250749)
("cpstak:40:20:11:1" . 1.0371479505513828)
("ntakl:40:20:12:1" . 1.0213756257162367)
("takl:40:20:12:1" . 1.0)
("tak:40:20:11:1" . 1.0126417896363957)
("triangl:22:1:50" . 1.0)
("puzzle:1000" . 1.0)
("divrec:1000:1000000" . 1.0450154469330961)
("diviter:1000:1000000" . 1.0591207445325488)
("destruc:600:50:4000" . 1.0838399255052662)
("deriv:10000000" . 1.0)
("browse:2000" . 1.018717561314545)
("bv2string:1000:1000:100" . 1.036089236974368)
("equal" . #f)
("mperm:20:10:2:1" . 1.0)
("gcbench:20:1" . 1.0243606915521992)
("sboyer:5:1" . 1.00368112089037)
("nboyer:5:1" . 1.0500604616494615)
("chudnovsky:50:500:50:1000" . 1.115409983742645)
("slatex:500" . 1.0002570334324394)
("scheme:100000" . 1.0390531892971318)
("quicksort:10000:2500" . 1.0098428078516584)
("primes:1000:10000" . 1.06437827292514)
("peval:2000" . 1.024359358481343)
("parsing:2500" . 1.0004232513670308)
("paraffins:23:10" . 2.024687502614597)
("nqueens:13:10" . 1.0058665553469563)
("mazefun:11:11:10000" . 1.056194215282642)
("maze:20:7:10000" . 1.020543843425558)
("matrix:5:5:2500" . 1.0028500406404608)
("lattice:44:10" . 1.0)
("graphs:7:3" . 1.0)
("earley:1" . 1.0256148071738138)
("dynamic:500" . 1.008662479565268)
("conform:500" . 1.0332430727462598)
("compiler:2000" . 1.006956809282123)
("read1:2500" . 1.0564058966125223)
("wc:inputs/bib:50" . 1.0335552278476583)
("tail:50" . 1.0)
("cat:50" . 1.0263527061380673)
("sum1:25" . 1.0638438694063255)
("string:500000:100" . 1.1084001200578586)
("array1:1000000:500" . 1.0547700539059255)
("ack:3:12:2" . 1.0)
("simplex:1000000" . 1.021845418562125)
("ray:50" . 1.0558263145762616)
("pnpoly:1000000" . 1.0598933662254997)
("pi:50:500:50:100" . 1.0211985475879175)
("nucleic:50" . 1.0313190698159154)
("mbrotZ:75:1000" . 1.0191939711368345)
("mbrot:75:1000" . 1.0325883765897468)
("fft:65536:100" . 1.1023483002887104)
("sumfp:1000000.0:500" . 1.0794299746553448)
("sum:10000:200000" . 1.063704305941153)
("fibfp:35.0:10" . 1.1160079648284265)
("fibc:30:10" . 1.0)
("fib:40:5" . 1.0533185743228644)
("ctak:27:16:8:1" . 1.2839324786349615)
("cpstak:40:20:11:1" . 1.0290465857280968)
("ntakl:40:20:12:1" . 1.017152038958873)
("takl:40:20:12:1" . 1.0008854776027978)
("tak:40:20:11:1" . 1.0077102329273817)
("triangl:22:1:50" . 1.0435679627887324)
("puzzle:1000" . 1.0006869727744467)
("divrec:1000:1000000" . 1.0)
("diviter:1000:1000000" . 1.0496228639946887)
("destruc:600:50:4000" . 1.0446502508269544)
("deriv:10000000" . 1.0901526807172006)
("browse:2000" . 1.0))

=== Guileregular Geometric Mean slowdown (successful tests / total tests) ===

1.0504373210343294 (112 / 114)


Actual full results from two runs:

=== Guiletuned times ===

(("ack:3:12:2" "2.85671086")
("ack:3:12:2" "2.920076389")
("array1:1000000:500" "2.719338434")
("array1:1000000:500" "2.630303504")
("browse:2000" "4.653660319")
("browse:2000" "5.118496161")
("bv2string:1000:1000:100" "1.433438423")
("bv2string:1000:1000:100" "1.386500303")
("cat:50" "10.334967974")
("cat:50" "10.407612189")
("chudnovsky:50:500:50:1000" "0.362723212")
("chudnovsky:50:500:50:1000" "0.371314469")
("compiler:2000" "2.14676404")
("compiler:2000" "2.355796491")
("conform:500" "4.878185941")
("conform:500" "4.834137994")
("cpstak:40:20:11:1" "17.407945755")
("cpstak:40:20:11:1" "17.213716706")
("ctak:27:16:8:1" "13.296419091")
("ctak:27:16:8:1" "13.101386139")
("deriv:10000000" "6.006358226")
("deriv:10000000" "6.160541397")
("destruc:600:50:4000" "2.524561809")
("destruc:600:50:4000" "2.585279527")
("diviter:1000:1000000" "4.459944493")
("diviter:1000:1000000" "4.655874665")
("divrec:1000:1000000" "6.71596458")
("divrec:1000:1000000" "6.722703389")
("dynamic:500" "3.525123929")
("dynamic:500" "3.809416833")
("earley:1" "4.054948659")
("earley:1" "4.260803481")
("equal" "ULIMITKILLED")
("equal" "ULIMITKILLED")
("fft:65536:100" "2.635766227")
("fft:65536:100" "2.509186252")
("fib:40:5" "4.193038108")
("fib:40:5" "4.202893409")
("fibc:30:10" "40.788333173")
("fibc:30:10" "36.494392282")
("fibfp:35.0:10" "9.395625366")
("fibfp:35.0:10" "9.67364254")
("gcbench:20:1" "0.99502713")
("gcbench:20:1" "1.014673477")
("graphs:7:3" "12.370817417")
("graphs:7:3" "13.124503659")
("lattice:44:10" "6.197259938")
("lattice:44:10" "6.154507367")
("matrix:5:5:2500" "3.641334999")
("matrix:5:5:2500" "3.73835108")
("maze:20:7:10000" "1.613933494")
("maze:20:7:10000" "1.61592533")
("mazefun:11:11:10000" "3.749008984")
("mazefun:11:11:10000" "3.737740216")
("mbrot:75:1000" "19.750189296")
("mbrot:75:1000" "19.153698506")
("mbrotZ:75:1000" "20.612462381")
("mbrotZ:75:1000" "21.07964648")
("mperm:20:10:2:1" "9.617642771")
("mperm:20:10:2:1" "9.281691405")
("nboyer:5:1" "1.872344958")
("nboyer:5:1" "1.925542129")
("nqueens:13:10" "6.834513689")
("nqueens:13:10" "6.715906809")
("ntakl:40:20:12:1" "3.226853095")
("ntakl:40:20:12:1" "3.375634349")
("nucleic:50" "4.703444216")
("nucleic:50" "4.776839468")
("paraffins:23:10" "2.986478347")
("paraffins:23:10" "5.984647443")
("parsing:2500" "3.588179787")
("parsing:2500" "3.589458835")
("peval:2000" "4.217629667")
("peval:2000" "4.453879673")
("pi:50:500:50:100" "0.526672392")
("pi:50:500:50:100" "0.503771353")
("pnpoly:1000000" "12.105856386")
("pnpoly:1000000" "12.216993927")
("primes:1000:10000" "2.763279203")
("primes:1000:10000" "2.859615422")
("puzzle:1000" "7.432281644")
("puzzle:1000" "7.359046832")
("quicksort:10000:2500" "4.919145241")
("quicksort:10000:2500" "4.680086002")
("ray:50" "6.232801675")
("ray:50" "6.289500818")
("read1:2500" "3.322952744")
("read1:2500" "3.135139562")
("sboyer:5:1" "1.585267198")
("sboyer:5:1" "1.550538069")
("scheme:100000" "5.899088913")
("scheme:100000" "6.305636088")
("simplex:1000000" "4.74155611")
("simplex:1000000" "4.764164057")
("slatex:500" "5.5026227")
("slatex:500" "5.537808753")
("string:500000:100" "0.68799508")
("string:500000:100" "0.680705551")
("sum1:25" "3.378466719")
("sum1:25" "3.260874144")
("sum:10000:200000" "1.715693396")
("sum:10000:200000" "1.720665139")
("sumfp:1000000.0:500" "17.278236223")
("sumfp:1000000.0:500" "17.121625997")
("tail:50" "4.837888687")
("tail:50" "4.868554424")
("tak:40:20:11:1" "2.207812177")
("tak:40:20:11:1" "2.13063615")
("takl:40:20:12:1" "3.273725333")
("takl:40:20:12:1" "3.356636843")
("triangl:22:1:50" "3.13643409")
("triangl:22:1:50" "3.112446043")
("wc:inputs/bib:50" "6.354178924")
("wc:inputs/bib:50" "6.062416889"))


=== Guileregular times ===

(("ack:3:12:2" "2.823197595")
("ack:3:12:2" "2.839448474")
("array1:1000000:500" "2.727697517")
("array1:1000000:500" "2.58605893")
("browse:2000" "4.62347843")
("browse:2000" "4.710018671")
("bv2string:1000:1000:100" "1.436538041")
("bv2string:1000:1000:100" "1.480061766")
("cat:50" "9.705074729")
("cat:50" "9.45588653")
("chudnovsky:50:500:50:1000" "0.404585092")
("chudnovsky:50:500:50:1000" "0.425650091")
("compiler:2000" "2.161698668")
("compiler:2000" "2.212490501")
("conform:500" "4.994839595")
("conform:500" "4.891769316")
("cpstak:40:20:11:1" "17.713716404")
("cpstak:40:20:11:1" "17.853171003")
("ctak:27:16:8:1" "16.821295179")
("ctak:27:16:8:1" "14.463871749")
("deriv:10000000" "6.507820501")
("deriv:10000000" "5.969641332")
("destruc:600:50:4000" "2.637284127")
("destruc:600:50:4000" "2.736220883")
("diviter:1000:1000000" "4.681259712")
("diviter:1000:1000000" "4.723619732")
("divrec:1000:1000000" "6.673202011")
("divrec:1000:1000000" "6.973599182")
("dynamic:500" "3.555660243")
("dynamic:500" "4.094633639")
("earley:1" "4.158815387")
("earley:1" "4.444094437")
("equal" "ULIMITKILLED")
("equal" "ULIMITKILLED")
("fft:65536:100" "2.7659972")
("fft:65536:100" "2.556631925")
("fib:40:5" "4.416604922")
("fib:40:5" "4.295627134")
("fibc:30:10" "36.233365092")
("fibc:30:10" "42.71370317")
("fibfp:35.0:10" "10.485592743")
("fibfp:35.0:10" "9.711991969")
("gcbench:20:1" "1.019266679")
("gcbench:20:1" "1.012182828")
("graphs:7:3" "11.912688219")
("graphs:7:3" "14.273013145")
("lattice:44:10" "6.134356748")
("lattice:44:10" "6.183086766")
("matrix:5:5:2500" "3.579898395")
("matrix:5:5:2500" "3.569724535")
("maze:20:7:10000" "1.647089891")
("maze:20:7:10000" "1.692950212")
("mazefun:11:11:10000" "3.815654415")
("mazefun:11:11:10000" "3.612644682")
("mbrot:75:1000" "19.777886446")
("mbrot:75:1000" "19.78458033")
("mbrotZ:75:1000" "21.008097389")
("mbrotZ:75:1000" "21.703652079")
("mperm:20:10:2:1" "8.094478518")
("mperm:20:10:2:1" "8.861341606")
("nboyer:5:1" "1.924134672")
("nboyer:5:1" "1.832403697")
("nqueens:13:10" "6.755306048")
("nqueens:13:10" "6.783168806")
("ntakl:40:20:12:1" "3.282200205")
("ntakl:40:20:12:1" "3.295829099")
("nucleic:50" "4.842285137")
("nucleic:50" "4.695234752")
("paraffins:23:10" "6.046685386")
("paraffins:23:10" "6.098533486")
("parsing:2500" "3.589698489")
("parsing:2500" "3.738489773")
("peval:2000" "4.32036842")
("peval:2000" "4.255106956")
("pi:50:500:50:100" "0.514450574")
("pi:50:500:50:100" "0.514649509")
("pnpoly:1000000" "12.830916876")
("pnpoly:1000000" "13.164018562")
("primes:1000:10000" "2.921479898")
("primes:1000:10000" "2.744775962")
("puzzle:1000" "6.021742132")
("puzzle:1000" "6.017608199")
("quicksort:10000:2500" "4.71159952")
("quicksort:10000:2500" "4.665676166")
("ray:50" "6.580756022")
("ray:50" "6.506202092")
("read1:2500" "3.31197992")
("read1:2500" "3.279529166")
("sboyer:5:1" "1.496605726")
("sboyer:5:1" "1.491116745")
("scheme:100000" "6.129467149")
("scheme:100000" "6.622910116")
("simplex:1000000" "4.766683108")
("simplex:1000000" "4.664779057")
("slatex:500" "5.504037058")
("slatex:500" "5.634341685")
("string:500000:100" "0.750405621")
("string:500000:100" "0.677016907")
("sum1:25" "3.469060967")
("sum1:25" "3.372192131")
("sum:10000:200000" "1.824990453")
("sum:10000:200000" "1.765433455")
("sumfp:1000000.0:500" "18.481596316")
("sumfp:1000000.0:500" "17.947802847")
("tail:50" "4.54999235")
("tail:50" "4.695161894")
("tak:40:20:11:1" "2.147063851")
("tak:40:20:11:1" "2.157571204")
("takl:40:20:12:1" "3.25309459")
("takl:40:20:12:1" "3.250216596")
("triangl:22:1:50" "3.201959263")
("triangl:22:1:50" "3.068280531")
("wc:inputs/bib:50" "6.111397639")
("wc:inputs/bib:50" "5.912986045"))


Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmQbdH8QHGFybmVfYmFi
QHdlYi5kZQAKCRAT741FJAPD6/uLD/4wosd/sFjAZEx1CH1tT8FswdYQI6MpvQNt
57ayTAPG+yOA7kHCSIndhDXzmAmlpyoUYUotF7ebK4RvFTCzZYk417+SxFimFf/k
M+rmwxyeW9d5pC+FV45YNshNfwdaRm6XmWT+Wp3v78nfvAT6w5sxWoZiqOztHl9c
pCkPNSrhQ/XGIJwMwH/TslE9UOOlRvpzIKbN+5378stHK6cy+kptj8/GSVwUw6Nm
f3vgexeXzhmA1vO0bsuRLlbBL3Kzk/Ejp5zuxi2OeZc+C2LcB5p6+WO7BGHY288D
kyuBibPsVE7ls3rfq4iSK0Gu2a202b30OB466SHCVB/GcaHnJREbm7g449mbyhNr
wmjsA6Ifzd4TtRRTUmjyEVAjY5G5+CElafi5IhgLjtFgIt+IhhDjP+9g5olXrqjK
sZgGBZgO3VAb0gubKOLC6SjF3j6FFBknAjotiqDa76aH5ghSH7WhfVfUbbSHo4f/
rCPusrOoq+rrNPqRXSXPAlmemwcp3geGvsGzyclhxWjLBJB2kYZcbO1p6srhxmHj
6jn8hpA8FIosKLhmUL/5INv5NAKU95vcHm68hjIn13v6NE6lRxTKzmuX4oBBO9Kx
jB3MpF8FO2QMw5N2GghxJYsvwDLZjZe3xUMAETcMPveEwKnc6jlPxDbeNzdtEwtm
PH+OqjlE44jEBAEBCAAuFiEE3Si95tmHXKvOSosd3M8NswvBBUgFAmQbdH8QHGFy
bmVfYmFiQHdlYi5kZQAKCRDczw2zC8EFSOLhA/9pHPD9umgxfGjkAmhszdfDZY7e
OuNITY5YGqPkiRh4UQFQ89uhgED/pk+31KazhLaF9tjuQlKW4zK85JACUlwtbO2u
sqpJ0HI4FBLTrxxpsHVf+clUjyHNsxuN+XGs+wnq4+Ye0qDIdvnbKVGyiSCK5EpR
8HOIoFZuHFwOkQ1iIA==
=7apk
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 26 Mar 2023 15:42
(name . Dr. Arne Babenhauserheide)(address . arne_bab@web.de)(address . 62395@debbugs.gnu.org)
878rfjd3yr.fsf@gnu.org
Hi,

"Dr. Arne Babenhauserheide" <arne_bab@web.de> skribis:

Toggle quote (5 lines)
> The attached patch adds a guile@3.0.9t package that enables CPU
> architecture tuning for Guile and for a specialized libgc.
>
> It creates new packages to avoid causing rebuilds.

Marking a package as tunable does not involve any rebuilds, by design:


Thus there’s no need to create package variants.

Toggle quote (7 lines)
> The results of a benchmark are still not fully conclusive: regular Guile
> seems to be slightly slower in the Geometric mean of all tests, but
> there are benchmarks where a tuned Guile is slower.
>
> Note that this is tuning for znver3 while I actually have znver4, but
> support for the correct compile-target will only arrive with GCC 13.

[...]

Toggle quote (7 lines)
> Guile tuned has a slowdown of 1.03512801239189
> Guile regular has a slowdown of 1.0504373210343294
>
> This suggests that the regular Guile is 1.48% slower than tuned Guile.
>
> Since I have no errorbars, I cannot say whether this is significant.

As far as I know, there’s no reason why Guile’s C code would benefit
from ISA extensions (we’re mostly talking about vector instructions like
those of AVX). The only part in libguile that’s performance-critical is
the VM engine—but I don’t see how that code could benefit from vector
instructions. Likewise, I doubt libgc build with ‘-march=znver3’ has
any chance of being any faster; most likely, the generated code is close
to the baseline.

For these reasons, I’m reluctant to this patch. Tuning should be done
only on packages where it makes sense, typically linear algebra code,
image/video processing, and so on.

WDYT?

Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 62395@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62395
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch