Rodrigo Mesquita pushed to branch wip/romes/async-rpc at Glasgow Haskell Compiler / GHC Commits: f22a9782 by Rodrigo Mesquita at 2026-11-25T11:38:46+00:00 test: Perf overhead of external interpreter communication Observed a regression in the async-rpc branch in the cost of communication with the external interpreter of about 10%. It compiles many trivial splices with -fno-code, to try and isolate the cost of the overhead of communication. - - - - - 2 changed files: - testsuite/tests/perf/compiler/all.T - + testsuite/tests/perf/compiler/genExtInterpManySplices Changes: ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -890,3 +890,15 @@ test ('T26989', multimod_compile, ['T26989', '-v0 -O']) +# Compile many trivial splices with -fno-code, to try and isolate the cost of communication with ext-interp. +# Introduced as a test against a regression that had been introduced in the async-rpc branch work. +test('ExtInterpManySplices', + [ collect_compiler_stats('bytes allocated', 2), + req_th, + unless(config.have_ext_interp, skip), + pre_cmd('./genExtInterpManySplices'), + extra_files(['genExtInterpManySplices']), + only_ways(['normal']), + ], + compile, + ['-fno-code -fexternal-interpreter']) ===================================== testsuite/tests/perf/compiler/genExtInterpManySplices ===================================== @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# One module with many trivial splices +NSPLICES=1000 +{ + echo "{-# LANGUAGE TemplateHaskell #-}" + echo "module ExtInterpManySplices where" + echo "import Language.Haskell.TH.Syntax" + for i in $(seq $NSPLICES); do + echo "x$i :: Int" + echo "x$i = \$(lift ($i :: Int))" + done +} > ExtInterpManySplices.hs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f22a97822cb17dd3bd91cffb7a239efc... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f22a97822cb17dd3bd91cffb7a239efc... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help