Use pgo to speed up loop performance (#1629)
This commit is contained in:
parent
6c1a66e853
commit
c04b83811c
5 changed files with 11 additions and 5 deletions
|
|
@ -170,9 +170,10 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl
|
||||||
(str base-install-cmd "\nsudo -E script/setup-musl")
|
(str base-install-cmd "\nsudo -E script/setup-musl")
|
||||||
base-install-cmd)))
|
base-install-cmd)))
|
||||||
(run "Download GraalVM" "script/install-graalvm")
|
(run "Download GraalVM" "script/install-graalvm")
|
||||||
|
(run "Download iprof" "curl -sLO 'https://github.com/babashka/pgo-profiles/releases/download/2023.09.27/default.iprof'")
|
||||||
(run "Build binary" (if (= "aarch64" arch)
|
(run "Build binary" (if (= "aarch64" arch)
|
||||||
"script/uberjar\nscript/compile -H:PageSize=64K"
|
"script/uberjar\nscript/compile -H:PageSize=64K --pgo=default.iprof"
|
||||||
"script/uberjar\nscript/compile") "30m")
|
"script/uberjar\nscript/compile --pgo=default.iprof") "30m")
|
||||||
(run "Run tests" "script/test\nscript/run_lib_tests")
|
(run "Run tests" "script/test\nscript/run_lib_tests")
|
||||||
(run "Release" ".circleci/script/release")
|
(run "Release" ".circleci/script/release")
|
||||||
{:persist_to_workspace {:root "/tmp"
|
{:persist_to_workspace {:root "/tmp"
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ task:
|
||||||
java -version
|
java -version
|
||||||
|
|
||||||
script/uberjar
|
script/uberjar
|
||||||
script/compile
|
curl -sLO 'https://github.com/babashka/pgo-profiles/releases/download/2023.09.27/default.iprof'
|
||||||
|
script/compile --pgo=default.iprof
|
||||||
|
|
||||||
# script/test
|
# script/test
|
||||||
# script/run_lib_tests
|
# script/run_lib_tests
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -37,3 +37,4 @@ target
|
||||||
.nrepl-port
|
.nrepl-port
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.portal
|
.portal
|
||||||
|
default.iprof
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ build_script:
|
||||||
- cmd: >-
|
- cmd: >-
|
||||||
powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://download.oracle.com/graalvm/21/archive/graalvm-jdk-21_windows-x64_bin.zip', 'graalvm.zip') }"
|
powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://download.oracle.com/graalvm/21/archive/graalvm-jdk-21_windows-x64_bin.zip', 'graalvm.zip') }"
|
||||||
|
|
||||||
|
powershell -Command "if (Test-Path('iprof.default')) { return } else { (New-Object Net.WebClient).DownloadFile('https://github.com/babashka/pgo-profiles/releases/download/2023.09.27/default.iprof', 'default.iprof') }"
|
||||||
|
|
||||||
powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }"
|
powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }"
|
||||||
|
|
||||||
- cmd: >-
|
- cmd: >-
|
||||||
|
|
@ -58,7 +60,7 @@ build_script:
|
||||||
- cmd: >-
|
- cmd: >-
|
||||||
call script/uberjar.bat
|
call script/uberjar.bat
|
||||||
|
|
||||||
call script/compile.bat
|
call script/compile.bat --pgo=default.iprof
|
||||||
|
|
||||||
echo Creating zip archive
|
echo Creating zip archive
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ call %GRAALVM_HOME%\bin\native-image.cmd ^
|
||||||
"--enable-preview" ^
|
"--enable-preview" ^
|
||||||
"--install-exit-handlers" ^
|
"--install-exit-handlers" ^
|
||||||
"-O1" ^
|
"-O1" ^
|
||||||
"%BABASHKA_XMX%"
|
"%BABASHKA_XMX%" ^
|
||||||
|
%*
|
||||||
|
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue