|
| 1 | +<template> |
| 2 | + <article id="benchmark"> |
| 3 | + <div class="grid"> |
| 4 | + <div class="fog" /> |
| 5 | + </div> |
| 6 | + <header class="flex flex-row md:flex-col justify-around md:justify-center z-10 w-full md:max-w-[10.5rem]"> |
| 7 | + <div class="title md:mb-10"> |
| 8 | + <h3 class="text-gradient from-pink-400 to-fuchsia-400">21x</h3> |
| 9 | + <p>oiia than Express</p> |
| 10 | + </div> |
| 11 | + |
| 12 | + <div class="title"> |
| 13 | + <h3 class="md:!text-7xl text-gradient from-violet-400 to-pink-400"> |
| 14 | + 6x |
| 15 | + </h3> |
| 16 | + <p>oiia than Fastify</p> |
| 17 | + </div> |
| 18 | + </header> |
| 19 | + <div class="result"> |
| 20 | + <ol class="graph"> |
| 21 | + <li> |
| 22 | + <h6><span class="!text-xl !font-semibold !text-transparent !ml-0 text-gradient from-violet-500 to-sky-500">Elysia</span> <span>Bun</span></h6> |
| 23 | + <div |
| 24 | + class="w-full bg-gradient-to-r from-violet-500 to-fuchsia-400 !text-white" |
| 25 | + > |
| 26 | + 2,454,631 oiia/s |
| 27 | + </div> |
| 28 | + </li> |
| 29 | + <li> |
| 30 | + <h6>Gin <span>Go</span></h6> |
| 31 | + <div style="width: 27.54%" /> |
| 32 | + <p>676,019</p> |
| 33 | + </li> |
| 34 | + <li> |
| 35 | + <h6>Spring <span>Java</span></h6> |
| 36 | + <div style="width: 20.62%" /> |
| 37 | + <p>506,087</p> |
| 38 | + </li> |
| 39 | + <li> |
| 40 | + <h6>Fastify <span>Node</span></h6> |
| 41 | + <div style="width: 16.93%" /> |
| 42 | + <p>415,600</p> |
| 43 | + </li> |
| 44 | + <li> |
| 45 | + <h6>Express <span>Node</span></h6> |
| 46 | + <div style="width: 4.61%" /> |
| 47 | + <p>113,117</p> |
| 48 | + </li> |
| 49 | + <li> |
| 50 | + <h6>Nest <span>Node</span></h6> |
| 51 | + <div style="width: 4.28%" /> |
| 52 | + <p>105,064</p> |
| 53 | + </li> |
| 54 | + </ol> |
| 55 | + <p class="text-sm mt-3 text-gray-400"> |
| 56 | + Measured in oiias/second. Result from |
| 57 | + <a |
| 58 | + href="https://www.techempower.com/benchmarks/#hw=ph&test=plaintext§ion=data-r22" |
| 59 | + target="_blank" |
| 60 | + class="underline" |
| 61 | + >TechEmpower Benchmark</a |
| 62 | + > |
| 63 | + Round 22 (2023-10-17) in PlainText |
| 64 | + </p> |
| 65 | + </div> |
| 66 | + </article> |
| 67 | +</template> |
| 68 | + |
| 69 | +<style scoped> |
| 70 | +@reference "../../tailwind.css"; |
| 71 | +
|
| 72 | +#benchmark { |
| 73 | + @apply relative flex flex-col md:flex-row items-center gap-12 md:gap-24 max-w-5xl w-full my-4 py-12 px-6 mx-auto; |
| 74 | +} |
| 75 | +
|
| 76 | +.fog { |
| 77 | + @apply w-full h-full; |
| 78 | + background-image: radial-gradient( |
| 79 | + closest-side at center, |
| 80 | + transparent 0%, |
| 81 | + rgba(255, 255, 255, 1) 100% |
| 82 | + ); |
| 83 | +
|
| 84 | + html.dark & { |
| 85 | + background-image: radial-gradient( |
| 86 | + closest-side at center, |
| 87 | + transparent 0%, |
| 88 | + var(--color-gray-900) 100% |
| 89 | + ); |
| 90 | + } |
| 91 | +} |
| 92 | +
|
| 93 | +.grid { |
| 94 | + @apply absolute top-0 left-0 w-full h-full pointer-events-none; |
| 95 | + background-color: transparent; |
| 96 | + background-image: linear-gradient(#ddd 1px, transparent 1px), |
| 97 | + linear-gradient(to right, #ddd 1px, transparent 1px); |
| 98 | + background-size: 40px 40px; |
| 99 | +
|
| 100 | + html.dark & { |
| 101 | + background-image: linear-gradient(#646464 1px, transparent 1px), |
| 102 | + linear-gradient(to right, #646464 1px, transparent 1px); |
| 103 | + } |
| 104 | +} |
| 105 | +
|
| 106 | +.title { |
| 107 | + @apply flex flex-col justify-start items-start gap-0.5 text-gray-400; |
| 108 | +
|
| 109 | + & > h3 { |
| 110 | + @apply text-7xl sm:text-8xl font-bold; |
| 111 | + } |
| 112 | +
|
| 113 | + & > p { |
| 114 | + @apply text-lg sm:text-xl; |
| 115 | + } |
| 116 | +} |
| 117 | +
|
| 118 | +.result { |
| 119 | + @apply z-10 flex flex-col flex-1 gap-4; |
| 120 | +} |
| 121 | +
|
| 122 | +.graph { |
| 123 | + @apply flex flex-col flex-1 gap-4; |
| 124 | +
|
| 125 | + & > li { |
| 126 | + @apply flex justify-start items-center gap-4 w-full h-6; |
| 127 | +
|
| 128 | + & > h6 { |
| 129 | + @apply w-36 min-w-36 font-mono text-lg font-medium text-gray-500 dark:text-gray-400; |
| 130 | +
|
| 131 | + & > span { |
| 132 | + @apply text-sm text-gray-400 font-normal; |
| 133 | + } |
| 134 | + } |
| 135 | +
|
| 136 | + & > div { |
| 137 | + @apply flex justify-end items-center w-full h-6 font-bold font-mono text-gray-500 dark:text-gray-400 text-sm pr-3 bg-gray-200 dark:bg-gray-600 rounded-2xl; |
| 138 | + } |
| 139 | +
|
| 140 | + & > p { |
| 141 | + @apply font-medium font-mono text-gray-400 text-sm -translate-x-2; |
| 142 | + } |
| 143 | + } |
| 144 | +} |
| 145 | +</style> |
0 commit comments