Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

ntex: upgrade ntex - #6323

Merged
NateBrady23 merged 1 commit into
TechEmpower:masterfrom
fafhrd91:master
Jan 28, 2021
Merged

NateBrady23 merged 1 commit into
TechEmpower:masterfrom
fafhrd91:master

Conversation

@fafhrd91

Copy link
Copy Markdown
Contributor
  • update ntex
  • drop sailfish bench

@NateBrady23
NateBrady23 merged commit 41e7756 into TechEmpower:master Jan 28, 2021
@pickfire

pickfire commented Feb 9, 2021

Copy link
Copy Markdown
Contributor
        let mut updates = Vec::new();
        for num in 1..=500u16 {
            let mut pl: u16 = 1;
            let mut q = String::new();
            q.push_str("UPDATE world SET randomnumber = CASE id ");
            for _ in 1..=num {
                let _ = write!(&mut q, "when ${} then ${} ", pl, pl + 1);
                pl += 2;
            }
            q.push_str("ELSE randomnumber END WHERE id IN (");
            for _ in 1..=num {
                let _ = write!(&mut q, "${},", pl);
                pl += 1;
            }
            q.pop();

Should we specify the capacity there to prevent multiple allocations?

@fafhrd91

fafhrd91 commented Feb 9, 2021

Copy link
Copy Markdown
Contributor Author
```rust
        let mut updates = Vec::new();
        for num in 1..=500u16 {
            let mut pl: u16 = 1;
            let mut q = String::new();
            q.push_str("UPDATE world SET randomnumber = CASE id ");
            for _ in 1..=num {
                let _ = write!(&mut q, "when ${} then ${} ", pl, pl + 1);
                pl += 2;
            }
            q.push_str("ELSE randomnumber END WHERE id IN (");
            for _ in 1..=num {
                let _ = write!(&mut q, "${},", pl);
                pl += 1;
            }
            q.pop();

Should we specify the capacity there to prevent multiple allocations?

doesnt matter, this code get executed at startup only

andreasrueb pushed a commit to digitallyinduced/IHP-FrameworkBenchmarks that referenced this pull request Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants