Consider the following code:
s := make([]*Foo, N)
for i := range s {
s[i] = new(Foo)
// ...
}| item | frequency | |
|---|---|---|
| user-agent | 739871221 | |
| accept-encoding | 733869339 | |
| accept-language | 733614410 | |
| accept | 729745441 | |
| date | 724032586 | |
| sec-fetch-mode | 723555429 | |
| sec-fetch-site | 723539507 | |
| sec-fetch-dest | 723538347 | |
| content-type | 718705785 |
| package interncache | |
| import ( | |
| "encoding/binary" | |
| "iter" | |
| "maps" | |
| "math" | |
| "math/bits" | |
| "math/rand/v2" | |
| "sync/atomic" |
| package main | |
| import ( | |
| "fmt" | |
| "math/bits" | |
| "slices" | |
| "sort" | |
| "strings" | |
| "unicode" | |
| ) |
Notes for a proposal to add per-session and/or per-transaction commit delay to postgresql.
Currently postgres has the commit_delay and commit_sibling global configurations.
To better support mixed workloads it would be significantly easier if a bit more flexibility was permitted, e.g. by allowing individual sessions or transactions to specify different acceptable commit delays, while still providing all required guarantees.
| // https://go.dev/play/p/374e3zUuZmE | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "flag" | |
| "fmt" | |
| "maps" | |
| "math/big" |
| As part of a reasoning step, Gemini 2.5 Pro Preview 03-25 randomly blurted out: | |
| --- | |
| If multiple possible answers are available in the sources, present all possible answers. | |
| If the question has multiple parts or covers various aspects, ensure that you answer them all to the best of your ability. | |
| When answering questions, aim to give a thorough and informative answer, even if doing so requires expanding beyond the specific inquiry from the user. | |
| If the question is time dependent, use the current date to provide most up to date information. | |
| If you are asked a question in a language other than English, try to answer the question in that language. | |
| Rephrase the information instead of just directly copying the information from the sources. |
| template <typename T> | |
| static void sort(T* a, int l) { | |
| #define S(i, j) { \ | |
| T t1 = a[i], t2 = a[j]; \ | |
| if (t1 > t2) { T t = t1; t1 = t2; t2 = t; } \ | |
| a[i] = t1, a[j] = t2;\ | |
| } | |
| // Sorting networks from https://bertdobbelaere.github.io/sorting_networks.html | |
| // Using the ones with lower CEs because every S(...) requires two CMOVxx or a | |
| // VMINSS+VMAXSS pair, and it seems that's the limit per cycle on current |
A MLNS is a
For small values of
Alternatively, an MLNS can also be used as the foundational building block of a