Benchmarks · 18 October 2026

The same profiler, four frameworks, one server

Source2Mod, CounterStrikeSharp, SwiftlyS2 and ModSharp each ran the scenarios of the Swiftly team's framework profiler alone on the same Linux dedicated server, with the same bots. Source2Mod ran them twice: as a native C++ plugin and as a SourcePawn plugin. Every value is the time one sample of the scenario took.

Game build
1.41.9.x
Map
de_dust2, competitive
Bots
20
Test
60 s per framework

Fastest per scenario

Source2Mod C++

native plugin · 18 Oct

10

of 13 compared scenarios

Source2Mod SourcePawn

SourcePawn 2.0 plugin · 18 Oct

1

of 13 compared scenarios

CounterStrikeSharp

v1.0.376 · 13 Oct

0

of 13 compared scenarios

SwiftlyS2

v1.4.14 · 13 Oct

0

of 13 compared scenarios

ModSharp

git-187 · 13 Oct

2

of 13 compared scenarios

Results

Average per sample

Min and max below each average. Green is the fastest average in the row, red the slowest. The profilers time in microseconds, so anything under 1 µs reads as <1 µs.

ScenarioSource2Mod C++Source2Mod SourcePawnCounterStrikeSharpSwiftlyS2ModSharp
Entities
Create 1024 entities5.13 ms5.13 ms – 5.13 ms · 1×4.50 ms4.50 ms – 4.50 ms · 1×266.80 ms266.80 ms – 266.80 ms · 1×5.83 ms5.83 ms – 5.83 ms · 1×6.80 ms6.80 ms – 6.80 ms · 1×
Spawn 1024 entities74.20 ms4.20 ms – 4.20 ms · 1×4.66 ms4.66 ms – 4.66 ms · 1×8.99 ms8.99 ms – 8.99 ms · 1×6.76 ms6.76 ms – 6.76 ms · 1×7.23 ms7.23 ms – 7.23 ms · 1×
Despawn entity51 entity<1 µs<1 µs – 4 µs · 1,025×<1 µs<1 µs – 4 µs · 1,025×<1 µs<1 µs – 350 µs · 1,029×<1 µs<1 µs – 140 µs · 1,030×<1 µs<1 µs – 70 µs · 1,024×
Schema Write + Update1024 entities310 µs310 µs – 310 µs · 1×960 µs960 µs – 960 µs · 1×3.99 ms3.99 ms – 3.99 ms · 1×1.08 ms1.08 ms – 1.08 ms · 1×4.90 ms4.90 ms – 4.90 ms · 1×
Schema Read1024 entities6 µs6 µs – 6 µs · 1×430 µs430 µs – 430 µs · 1×1.08 ms1.08 ms – 1.08 ms · 1×310 µs310 µs – 310 µs · 1×490 µs490 µs – 490 µs · 1×
Virtual Callsteleport 1024 entities180 µs180 µs – 180 µs · 1×220 µs220 µs – 220 µs · 1×4.55 ms4.55 ms – 4.55 ms · 1×520 µs520 µs – 520 µs · 1×320 µs320 µs – 320 µs · 1×
Teleport All Game Entities450 µs370 µs – 1.39 ms · 3,846×510 µs420 µs – 1.36 ms · 3,845×1.16 ms670 µs – 43.06 ms · 3,725×540 µs400 µs – 14.46 ms · 1,972×590 µs320 µs – 3.21 ms · 3,847×
Get Game Rules<1 µs<1 µs – 30 µs · 3,846×3 µs1 µs – 40 µs · 3,845×110 µs70 µs – 38.24 ms · 3,725×4 µs1 µs – 2.34 ms · 1,972×1 µs<1 µs – 70 µs · 3,847×
ConVars
Find ConVar2 µs<1 µs – 30 µs · 3,846×3 µs1 µs – 130 µs · 3,845×5 µs1 µs – 570 µs · 3,725×10 µs3 µs – 240 µs · 1,972×7 µs1 µs – 140 µs · 3,847×
Read ConVar1024 times<1 µs<1 µs – 10 µs · 3,846×20 µs20 µs – 100 µs · 3,845×240 µs210 µs – 39.13 ms · 3,725×1 µs1 µs – 90 µs · 1,972×1 µs1 µs – 90 µs · 3,847×
Write ConVar1024 times<1 µs<1 µs – 50 µs · 3,846×1.02 ms6920 µs – 2.00 ms · 3,845×1.17 ms1.00 ms – 35.37 ms · 3,725×1.30 ms1.20 ms – 3.38 ms · 1,972×810 µs700 µs – 1.77 ms · 3,847×
Replicate ConVar to Client1024 times100 µs90 µs – 1.04 ms · 76,920×450 µs420 µs – 3.36 ms · 76,900×empty in profiler11.20 ms850 µs – 30.80 ms · 39,440×not implemented2
Events and net messages
Fire Game Event to Players20 µs10 µs – 80 µs · 3,846×30 µs10 µs – 170 µs · 3,845×20 µs7 µs – 400 µs · 3,725×failed33 µs1 µs – 730 µs · 3,847×
Send NetMessage to All Players9 µs5 µs – 70 µs · 3,846×10 µs6 µs – 170 µs · 3,845×20 µs8 µs – 290 µs · 3,725×failed33 µs<1 µs – 2.13 ms · 3,847×
CMsgSosStartSoundEvent Add All RecipientsServer sends NetMessage, 1024 times<1 µs<1 µs – 30 µs · 1,240×3 µs3 µs – 110 µs · 1,270×31.03 ms26.04 ms – 69.05 ms · 1,212×3 µs1 µs – 40 µs · 645×140 µs130 µs – 320 µs · 1,235×
Client messages
CCLCMsg_Move Simulate DataServer receives NetMessage, 1024 timesno client4no client4no client4no client4no client4
  1. 1CounterStrikeSharp's reference profiler has the replication call commented out, so the row times an empty block.
  2. 2ModSharp's reference profiler does not implement ConVar replication.
  3. 3SwiftlyS2’s profiler threw “The event is invalid” from its game event setter on this build; the exception ends the tick, so these two rows never completed.
  4. 4Only real clients send CCLCMsg_Move and the run had bots only. Of the reference profilers only SwiftlyS2 implements the handler.
  5. 5Every framework despawns in under 1 µs per entity; the row counts as a tie.
  6. 6The SourcePawn API sets a ConVar through the engine’s setter (change callbacks, replication to every client), the same as the g_pSource2ModConVars row below; there is no direct value access from a script.
  7. 7Spawning runs the entity listener, which despawns each entity again (the Despawn row), for every framework.

Memory

What stays after the test

Resident memory of the whole server process before the test, at its end and 30 s after endtest, and the managed heap the C# profilers report. Source2Mod has no garbage-collected heap.

FrameworkRSS beforeRSS end of testRSS +30 sKept after testManaged heap before / after / after GC
Source2Mod C++1029.8 MB1039.0 MB1029.5 MB-0.3 MB—
Source2Mod SourcePawn1051.5 MB1055.7 MB1047.0 MB-4.5 MB—
CounterStrikeSharp1256.3 MB1304.4 MB1308.6 MB+52.3 MB2.4 / 55.8 / 11.4 MB
SwiftlyS21135.9 MB1221.2 MB1199.0 MB+63.1 MB4.1 / 31.6 / 5.8 MB
ModSharp1311.8 MB1345.2 MB1337.7 MB+25.9 MB23.8 / 62.0 / 24.2 MB

Source2Mod API rows

The C++ ConVar rows above use direct access, as the other frameworks' getters and setters do. Through g_pSource2ModConVarsthe same writes go through the engine's setter, which runs change callbacks and replicates every write to all clients — the setter a SourcePawn plugin's ConVar.FloatValue uses too.

Find ConVarg_pSource2ModConVars<1 µs<1 µs – 40 µs
Read ConVarg_pSource2ModConVars · 1024 times10 µs10 µs – 130 µs
Write ConVarg_pSource2ModConVars · 1024 times920 µs830 µs – 1.98 ms

Method

Each framework ran alone: its own loader, its own profiler, no other plugins, the server's addons and gameinfo.gi restored between runs. Bots were added over RCON the same way every time; a vanilla competitive server takes 10 per team. Then starttest, 60 s of ticks, endtest and savetest.

The CounterStrikeSharp, SwiftlyS2 and ModSharp profilers are the reference ones from swiftly-solution/profiler, built unchanged except for the framework package versions. The Source2Mod profilers are independent implementations of the same scenarios, one native C++ plugin and one SourcePawn plugin that only uses Source2Mod's SourcePawn API and times inside the script.

The two Source2Mod columns were measured on 18 October 2026 on the same server, map and bot setup; the CounterStrikeSharp, SwiftlyS2 and ModSharp columns are from the 13 October 2026 run.

Scenarios, sizes, names and trace format by the Swiftly Development Team.