[PR #599] [CLOSED] Separate the cache check and member lookup into different methods #634

Closed
opened 2025-12-30 01:25:51 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/599
Author: @KushalP
Created: 7/25/2024
Status: Closed

Base: mainHead: speculative-split-cache-check-member-lookup


📝 Commits (1)

  • cc443fc Separate the cache check and member lookup into different methods

📊 Changes

4 files changed (+72 additions, -3 deletions)

View changed files

📝 bench/bench.gradle.kts (+4 -0)
📝 bench/gradle.lockfile (+3 -2)
bench/src/jmh/java/org/pkl/core/runtime/VmUtilsBenchmarks.java (+53 -0)
📝 pkl-core/src/main/java/org/pkl/core/runtime/VmUtils.java (+12 -1)

📄 Description

This allows for better inlining and optimization of the cache check, which is a common path.

Original results

Benchmark                                    Mode  Cnt   Score   Error  Units
VmUtilsBenchmarks.readMemberOrNullCacheHit   avgt    5  18.906 ± 0.726  ns/op
VmUtilsBenchmarks.readMemberOrNullCacheMiss  avgt    5  15.274 ± 0.149  ns/op

This change results

Benchmark                                    Mode  Cnt   Score   Error  Units
VmUtilsBenchmarks.readMemberOrNullCacheHit   avgt    5  16.819 ± 0.837  ns/op
VmUtilsBenchmarks.readMemberOrNullCacheMiss  avgt    5  15.710 ± 0.906  ns/op

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/599 **Author:** [@KushalP](https://github.com/KushalP) **Created:** 7/25/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `speculative-split-cache-check-member-lookup` --- ### 📝 Commits (1) - [`cc443fc`](https://github.com/apple/pkl/commit/cc443fc59750b15e10f7eea57ac1ddea45b908e5) Separate the cache check and member lookup into different methods ### 📊 Changes **4 files changed** (+72 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `bench/bench.gradle.kts` (+4 -0) 📝 `bench/gradle.lockfile` (+3 -2) ➕ `bench/src/jmh/java/org/pkl/core/runtime/VmUtilsBenchmarks.java` (+53 -0) 📝 `pkl-core/src/main/java/org/pkl/core/runtime/VmUtils.java` (+12 -1) </details> ### 📄 Description This allows for better inlining and optimization of the cache check, which is a common path. Original results ---------------- ``` Benchmark Mode Cnt Score Error Units VmUtilsBenchmarks.readMemberOrNullCacheHit avgt 5 18.906 ± 0.726 ns/op VmUtilsBenchmarks.readMemberOrNullCacheMiss avgt 5 15.274 ± 0.149 ns/op ``` This change results ------------------- ``` Benchmark Mode Cnt Score Error Units VmUtilsBenchmarks.readMemberOrNullCacheHit avgt 5 16.819 ± 0.837 ns/op VmUtilsBenchmarks.readMemberOrNullCacheMiss avgt 5 15.710 ± 0.906 ns/op ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:25:51 +01:00
adam closed this issue 2025-12-30 01:25:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#634