Comments (7)
Actually, it's doing multiple allocations.
I checked in a custom allocator that will put them into an arena. It made the CBC encryption about 10% faster on a Ubuntu VM I'm using. We'll see what numbers @tycho comes up with for AES-GCM, on the allocation sizes we care about most. If it's not a decent win, maybe back it out or make it an option? Still, regardless of the numbers, it really bothers me to be making multiple heap calls per packet!
Maybe the heap is fast nowadays and I'm just a dinosaur.
from gamenetworkingsockets.
^ For reference: 17c52cb
from gamenetworkingsockets.
The numbers are in!
I am a dinosaur.
I'll back out that "optimization". Closing this.
from gamenetworkingsockets.
I think the perf diff would depend on the heap implementation. Most modern implementations use a thread-local small allocation pool.
from gamenetworkingsockets.
FWIW Unreal isn't doing anything special around EVP_CIPHER_CTX_new
,
from gamenetworkingsockets.
Unreal uses jmalloc for the whole engine though.
from gamenetworkingsockets.
Re-opening this issue. Just so I can officially close it for really realz.
from gamenetworkingsockets.
Related Issues (20)
- Update go wrapper HOT 2
- How to build the library for steam runtime (scout?) HOT 1
- str_size macro
- incorrectly detecting if bcrypt is available HOT 3
- Building fails on Archlinux with error HOT 3
- thread sanitizer detects issues HOT 4
- valgrind: Conditional jump or move depends on uninitialised value HOT 6
- lets move to zpp::bits!? HOT 2
- Steps to build for iOS and Android
- VCPKG / Building x86-windows-static
- Where/Who to contact for console access HOT 1
- cs2 and csgo ping HOT 1
- Early Retry Mechanism for SteamNetworkingSockets Authentication HOT 9
- Build fails to succeed for Windows / Visual Studio HOT 1
- Request to add compression
- minbase_decls.h always defines DLL_EXPORT on Windows (issues with static pthread)
- Build fails with clang 16 from non utf-8 garbage character
- Q: Performance warning
- Segmentation fault on CreateListenSocketIP using WSL2 Ubuntu
- Fail to build in windows 10 x64 due to openssl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamenetworkingsockets.