$ ab -k -c 10 -n 10000 http://127.0.0.1:3000/
Node
Requests per second: 10137.73 [#/sec] (mean)
Go
FROM php:7.3-apache | |
RUN a2enmod rewrite |
package main | |
import ( | |
"bufio" | |
"embed" | |
"errors" | |
"flag" | |
"fmt" | |
"image" | |
_ "image/jpeg" |
ぽぽぽわっ | |
ぽぽぽぽ | |
ぽ | |
ぽぽ | |
ぽぽぽぽわわ | |
わぽわっわ | |
わぽぽわ | |
ぽぽぽわっぽわ | |
わぽわっわ |
#include <unistd.h> | |
#include <stdio.h> | |
const char fizzbuzz[] = "1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 FizzBuzz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 FizzBuzz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 FizzBuzz 61 62 Fizz 64 Buzz Fizz 67 68 Fizz Buzz 71 Fizz 73 74 FizzBuzz 76 77 Fizz 79 Buzz Fizz 82 83 Fizz Buzz 86 Fizz 88 89 FizzBuzz 91 92 Fizz 94 Buzz Fizz 97 98 Fizz Buzz "; | |
int | |
main(int argc, char* argv[]) { | |
write(fileno(stdout), fizzbuzz, sizeof(fizzbuzz)); | |
return 0; | |
} |
module Users/is/dev-env/go/project1 | |
go 1.21.0 | |
require golang.org/x/sync v0.3.0 |
import "websocket-polyfill" | |
import { | |
nip19, | |
relayInit, | |
generatePrivateKey, | |
getPublicKey, | |
getEventHash, | |
signEvent | |
} from 'nostr-tools' |
export default function (server: Server, ctx: AppContext) { | |
server.app.bsky.actor.getProfile({ | |
auth: authOptionalVerifier, | |
handler: async ({ auth, params }) => { | |
const { actor } = params | |
const requester = auth.credentials.did | |
const { db, services } = ctx | |
const actorService = services.actor(db) | |
const actorRes = await actorService.getActor(actor, true) |
$ ab -k -c 10 -n 10000 http://127.0.0.1:3000/
Node
Requests per second: 10137.73 [#/sec] (mean)
Go
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 923ae3d..527e293 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -125,8 +125,10 @@ IF (OPENSSL_FOUND AND NOT (OPENSSL_VERSION VERSION_LESS "1.0.1")) | |
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) | |
ADD_LIBRARY(picotls-openssl lib/openssl.c) | |
TARGET_LINK_LIBRARIES(picotls-openssl ${OPENSSL_CRYPTO_LIBRARIES} picotls-core ${CMAKE_DL_LIBS}) | |
- ADD_EXECUTABLE(cli t/cli.c lib/pembase64.c) | |
- TARGET_LINK_LIBRARIES(cli picotls-openssl picotls-core) |
$ time node main1.js > /dev/null
real 6.379
system 0.843
user 2.187
$ time node main2.js > /dev/null
real 4.608