Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add crate to calculate prehashes #8262

Merged
merged 1 commit into from
Jun 3, 2024
Merged

add crate to calculate prehashes #8262

merged 1 commit into from
Jun 3, 2024

Conversation

arlyon
Copy link
Contributor

@arlyon arlyon commented May 31, 2024

Description

We have a few cases where certain keys are repeatedly inserted into hashmaps. In these situations we can prehash items. This crate will do that.

Testing Instructions

There is a basic doctest to demonstrate the functionality. The code is pretty straight forward.

Copy link

vercel bot commented May 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 3:17pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 3:17pm
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2024 3:17pm

Copy link
Contributor Author

arlyon commented May 31, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @arlyon and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented May 31, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented May 31, 2024

⚠️ This change may fail to build next-swc.

Logs

error: failed to select a version for `swc_core`.
    ... required by package `turbopack-binding v0.1.0 (https://github.com/vercel/turbo?rev=7398ce4ec700940e076f48f521138ecd823e766b#226101fe)`
    ... which satisfies git dependency `turbopack-binding` (locked to 0.1.0) of package `next-swc-napi v0.0.0 (/root/actions-runner/_work/turbo/turbo/packages/next-swc/crates/napi)`
versions that meet the requirements `^0.92.8` are: 0.92.8

all possible versions conflict with previously selected packages.

  previously selected package `swc_core v0.92.5`
    ... which satisfies dependency `swc_core = "^0.92.5"` (locked to 0.92.5) of package `wasm v0.0.0 (/root/actions-runner/_work/turbo/turbo/packages/next-swc/crates/wasm)`

failed to select a version for `swc_core` which could resolve this conflict

See job summary for details

Copy link
Contributor

github-actions bot commented May 31, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

@sokra
Copy link
Member

sokra commented Jun 3, 2024

There is a lint error

error[unlicensed]: turbo-prehash = 0.1.0 is unlicensed
  ┌─ path+file:///github/workspace/crates/turbo-prehash#0.1.0:2:9
  │
2 │ name = "turbo-prehash"
  │         ^^^^^^^^^^^^^ a valid license expression could not be retrieved for the crate
3 │ version = "0.1.0"
4 │ license = ""
  │            - license expression was not specified
  │
  = turbo-prehash v0.1.0

@arlyon arlyon force-pushed the arlyon/prehash-crate branch from c6c969d to 334f637 Compare June 3, 2024 15:15
@arlyon arlyon merged commit 13aba96 into main Jun 3, 2024
54 of 56 checks passed
@arlyon arlyon deleted the arlyon/prehash-crate branch June 3, 2024 15:42
Copy link
Contributor Author

arlyon commented Jun 3, 2024

Merge activity

kdy1 added a commit to vercel/next.js that referenced this pull request Jun 5, 2024
# Turbopack

* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->


### What?

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

### Why?

To reduce memory usage.

### How?

Closes PACK-2776
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

We have a few cases where certain keys are repeatedly inserted into
hashmaps. In these situations we can prehash items. This crate will do
that.

### Testing Instructions

There is a basic doctest to demonstrate the functionality. The code is
pretty straight forward.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

We have a few cases where certain keys are repeatedly inserted into
hashmaps. In these situations we can prehash items. This crate will do
that.

### Testing Instructions

There is a basic doctest to demonstrate the functionality. The code is
pretty straight forward.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

We have a few cases where certain keys are repeatedly inserted into
hashmaps. In these situations we can prehash items. This crate will do
that.

### Testing Instructions

There is a basic doctest to demonstrate the functionality. The code is
pretty straight forward.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

We have a few cases where certain keys are repeatedly inserted into
hashmaps. In these situations we can prehash items. This crate will do
that.

### Testing Instructions

There is a basic doctest to demonstrate the functionality. The code is
pretty straight forward.
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 14, 2024
# Turbopack

* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->


### What?

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

### Why?

To reduce memory usage.

### How?

Closes PACK-2776
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 15, 2024
* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

To reduce memory usage.

Closes PACK-2776
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 16, 2024
* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

To reduce memory usage.

Closes PACK-2776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants