René's URL Explorer Experiment


Title: Performance improvements · Issue #163 · feos-org/feos · GitHub

Open Graph Title: Performance improvements · Issue #163 · feos-org/feos

X Title: Performance improvements · Issue #163 · feos-org/feos

Description: Following some guidelines of the Rust Performance Book here are some things we can try to improve performance: Add codegen-units = 1 to release build Use a faster allocator. E.g. mimalloc works on all operating systems Not so easy: prope...

Open Graph Description: Following some guidelines of the Rust Performance Book here are some things we can try to improve performance: Add codegen-units = 1 to release build Use a faster allocator. E.g. mimalloc works on ...

X Description: Following some guidelines of the Rust Performance Book here are some things we can try to improve performance: Add codegen-units = 1 to release build Use a faster allocator. E.g. mimalloc works on ...

Opengraph URL: https://github.com/feos-org/feos/issues/163

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance improvements","articleBody":"Following some guidelines of the [Rust Performance Book](https://nnethercote.github.io/perf-book/title-page.html) here are some things we can try to improve performance:\r\n\r\n- Add `codegen-units = 1` to release build\r\n- Use a faster allocator. E.g. [mimalloc](https://github.com/microsoft/mimalloc) works on all operating systems\r\n\r\nNot so easy:\r\n- properly profile to identify hot parts\r\n- remove clones/allocations where not needed\r\n- use profile-guided optimization (e.g. via [cargo-pgo](https://github.com/Kobzol/cargo-pgo))\r\n  - unfortunately this is currently not working with LTO and the PGO version is 10-20% slower than LTO\r\n  - might be available in the future in `maturin` directly, see [here](https://github.com/PyO3/maturin/issues/1840)\r\n\r\n---\r\n\r\nQuick tests with `codegen-units = 1` added to `release-lto` (see [here](https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units)) show performance improvements of benchmarks of up to 12% (mean is about 7%) while for `dual_number`, changes are a bit smaller (see below).\r\n\r\nProper benchmarks (across all benchmarks) with comparison to current release workflow are needed but this might be an easy-to-get improvement if it turns out to be faster for all cases.\r\n\r\n- Benchmark: dual_numbers\r\n- System: methane/CO2\r\n- `main`: main branch + lto\r\n- `main_codegen`: main branch + lto + codegen-units = 1\r\n- `develop_`: like main\r\n\r\n**Execution times in µs**\r\n| name            |    f64 |   dual |   dual2 |   hyperdual |   dual3 |\r\n|:----------------|-------:|-------:|--------:|------------:|--------:|\r\n| main            | 1.1382 | 1.2325 |  1.4539 |      1.6267 |  1.7563 |\r\n| main_codegen    | 1.0229 | 1.1741 |  1.3708 |      1.5777 |  1.6316 |\r\n| develop         | 1.0138 | 1.1989 |  1.4465 |      1.589  |  1.7549 |\r\n| develop_codegen | 0.9761 | 1.1681 |  1.4195 |      1.5446 |  1.6304 |\r\n\r\n**Slowdown t_f64/t_d for each branch/option**\r\n|                 |   f64 |    dual |   dual2 |   hyperdual |   dual3 |\r\n|:----------------|------:|--------:|--------:|------------:|--------:|\r\n| main            |     1 | 1.08285 | 1.27737 |     1.42919 | 1.54305 |\r\n| main_codegen    |     1 | 1.14782 | 1.34011 |     1.54238 | 1.59507 |\r\n| develop         |     1 | 1.18258 | 1.42681 |     1.56737 | 1.73101 |\r\n| develop_codegen |     1 | 1.1967  | 1.45426 |     1.58242 | 1.67032 |\r\n\r\n**Relative difference in % w.r.t. main + lto for each dual number (t_d_branch - t_d_main) / t_d_main * 100**\r\n| name            |      f64 |     dual |     dual2 |   hyperdual |     dual3 |\r\n|:----------------|---------:|---------:|----------:|------------:|----------:|\r\n| main_codegen    | -10.13   | -4.74 | -5.72  |    -3.01 | -7.10  |\r\n| develop         | -10.93 | -2.73 | -0.51 |    -2.32 | -0.08 |\r\n| develop_codegen | -14.24 | -5.23 | -2.37  |    -5.05 | -7.17  |\r\n\r\n","author":{"url":"https://github.com/g-bauer","@type":"Person","name":"g-bauer"},"datePublished":"2023-06-27T13:17:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/163/feos/issues/163"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:994e7ca4-112b-949b-b493-2c0766088e73
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB2AE:D2022:F9A6F2:1484425:698EC94F
html-safe-noncea018faf23cdcfcb8671d2438c8d05109732067feb54a1d6275829f603a109c68
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkFFOkQyMDIyOkY5QTZGMjoxNDg0NDI1OjY5OEVDOTRGIiwidmlzaXRvcl9pZCI6IjY4ODU0MzIwOTQ1NjM5NDQ3ODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac632bc8373988fe81f0dae0b51c1ea8d0f64be8f92fb77d8c873d41a341c2bbbe
hovercard-subject-tagissue:1776946224
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feos-org/feos/163/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2b2dd880fb3fc0952df220b4f5033efda542950fc67d02a60180478ea06dea34/feos-org/feos/issues/163
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2b2dd880fb3fc0952df220b4f5033efda542950fc67d02a60180478ea06dea34/feos-org/feos/issues/163
og:image:altFollowing some guidelines of the Rust Performance Book here are some things we can try to improve performance: Add codegen-units = 1 to release build Use a faster allocator. E.g. mimalloc works on ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameg-bauer
hostnamegithub.com
expected-hostnamegithub.com
Nonecb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba
turbo-cache-controlno-preview
go-importgithub.com/feos-org/feos git https://github.com/feos-org/feos.git
octolytics-dimension-user_id87855701
octolytics-dimension-user_loginfeos-org
octolytics-dimension-repository_id424905104
octolytics-dimension-repository_nwofeos-org/feos
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id424905104
octolytics-dimension-repository_network_root_nwofeos-org/feos
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6b91a7e6e46287d26887e3fb7a4161657bab8f7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/feos-org/feos/issues/163#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeos-org%2Ffeos%2Fissues%2F163
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeos-org%2Ffeos%2Fissues%2F163
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feos-org%2Ffeos
Reloadhttps://patch-diff.githubusercontent.com/feos-org/feos/issues/163
Reloadhttps://patch-diff.githubusercontent.com/feos-org/feos/issues/163
Reloadhttps://patch-diff.githubusercontent.com/feos-org/feos/issues/163
feos-org https://patch-diff.githubusercontent.com/feos-org
feoshttps://patch-diff.githubusercontent.com/feos-org/feos
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Ffeos-org%2Ffeos
Fork 30 https://patch-diff.githubusercontent.com/login?return_to=%2Ffeos-org%2Ffeos
Star 177 https://patch-diff.githubusercontent.com/login?return_to=%2Ffeos-org%2Ffeos
Code https://patch-diff.githubusercontent.com/feos-org/feos
Issues 22 https://patch-diff.githubusercontent.com/feos-org/feos/issues
Pull requests 5 https://patch-diff.githubusercontent.com/feos-org/feos/pulls
Discussions https://patch-diff.githubusercontent.com/feos-org/feos/discussions
Actions https://patch-diff.githubusercontent.com/feos-org/feos/actions
Projects 0 https://patch-diff.githubusercontent.com/feos-org/feos/projects
Security 0 https://patch-diff.githubusercontent.com/feos-org/feos/security
Insights https://patch-diff.githubusercontent.com/feos-org/feos/pulse
Code https://patch-diff.githubusercontent.com/feos-org/feos
Issues https://patch-diff.githubusercontent.com/feos-org/feos/issues
Pull requests https://patch-diff.githubusercontent.com/feos-org/feos/pulls
Discussions https://patch-diff.githubusercontent.com/feos-org/feos/discussions
Actions https://patch-diff.githubusercontent.com/feos-org/feos/actions
Projects https://patch-diff.githubusercontent.com/feos-org/feos/projects
Security https://patch-diff.githubusercontent.com/feos-org/feos/security
Insights https://patch-diff.githubusercontent.com/feos-org/feos/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/feos-org/feos/issues/163
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/feos-org/feos/issues/163
Performance improvementshttps://patch-diff.githubusercontent.com/feos-org/feos/issues/163#top
enhancementNew feature or requesthttps://github.com/feos-org/feos/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/g-bauer
https://github.com/g-bauer
g-bauerhttps://github.com/g-bauer
on Jun 27, 2023https://github.com/feos-org/feos/issues/163#issue-1776946224
Rust Performance Bookhttps://nnethercote.github.io/perf-book/title-page.html
mimallochttps://github.com/microsoft/mimalloc
cargo-pgohttps://github.com/Kobzol/cargo-pgo
herehttps://github.com/PyO3/maturin/issues/1840
herehttps://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
enhancementNew feature or requesthttps://github.com/feos-org/feos/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.