Why You Should Use Memory Mapped Files
A memory mapped file is a file that can be read like a byte array from your program. They are the fastest way to parse data and to do inter-process communication (by a long way). In this video we explain its intricacies, and we show a demo program capable of doing 11 million ping-pong messages per second between two process using memory mapped files.
0:00 Start
2:30 Some of the Basics First
7:00 Semantical Benefits
10:40 Code: How to Open a Memory Map File
15:30 Performance Benefits
16:00 Swap and Memory Map Files are the same thing
22:00 Most Efficient way to Share Memory Between Processes; Compare And Swap, Memory Barriers
25:20 One System Call
27:38 Code: Memory Mapped File Ping between two processes
31:00 Code: Atomic Load/Store
34:50 Demo: 9 millions pings per second between two processes via mapped files
36:30 Demo: vs 24 kilo pings per second when using local network
40:20 The Small Prints: two caveats
46:30 Thank you
The Memory Ping Pong: https://github.com/ComputerSaysYeah/MemMapPing
The Blog Post: https://yeah.computer/posts/019-why-you-should-use-memory-mapped-files
-
4:12
Hack
1 day agoWhat can be made out of plastic bottle lids
682 -
13:07
Exploring With Nug
1 day agoFailed Justice: 4-Year Sentence for Man Who Murdered Young Girl
1K7 -
24:03
Brewzle
20 hours agoWe Find INSANE Bottles Bourbon Hunting in Georgia
9.53K3 -
15:38
Degenerate Jay
15 hours agoThe Most Frustrating Trend That's Ruining Video Games
1.2K2 -
16:42
Space Ice
17 hours agoArnold's Conan The Destroyer Proved Masculinity Is The Greatest Thing Ever - Best Movie Ever
5.91K27 -
7:00
Hannah Barron
15 hours agoEven Rednecks Need a Girls Day!
21.4K44 -
15:25
shaneandliana
14 hours agoExtreme Disrespectful Prank On Uncle
10.4K8 -
2:08:23
Crime Circus
22 hours agoA Monster's Interrogation & CONFESSION in Macon, Georgia - Interview with a KlLLER
14.7K8 -
33:51
Censored TV
15 hours agoS6E4 - IN DEFENSE OF MEDIOCRITY (FREE PART)
21.9K9 -
2:21:51
Fresh and Fit
9 hours agoAfter Hours w/ CastleClub Questions
69.4K101