jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
"use strict";
window.testRequest = {
model: "gpt-4",
messages: [
{
role: "system",
content: "Sen yardımcı bir asistansın."
},
{
role: "user",
content: "TypeScript'te interface ve type arasındaki fark nedir?"
},
{
role: "assistant",
content: "Interface ve type arasındaki temel farklar şunlardır: Interface declaration merging destekler, type ise union ve intersection için daha uygun."
},
{
role: "user",
content: [
{ type: "text", text: "Bir örnek kod gösterir misin?" },
{ type: "text", text: "Özellikle extends kullanımını merak ediyorum." }
]
}
]
};
// Test Response
window.testResponse = {
id: "chatcmpl-abc123",
object: "chat.completion",
created: 1699876543,
model: "gpt-4",
choices: [
{
index: 0,
message: {
role: "assistant",
content: `İşte interface ve type karşılaştırması:
\`\`\`typescript
// Interface extends
interface Animal {
name: string;
}
interface Dog extends Animal {
breed: string;
}
// Type intersection
type Animal = { name: string };
type Dog = Animal & { breed: string };
\`\`\`
Her ikisi de benzer sonuç verir ancak interface daha okunabilir.`
},
finish_reason: "stop"
}
],
usage: {
prompt_tokens: 85,
completion_tokens: 120,
total_tokens: 205
}
};
Ready to run.
| Test | Ops/sec | |
|---|---|---|
| Default | | ready |
| Optimized | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.