Skip to content

matklad/thrench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Futures vs Threads benchmark

Compare asynchronous tokio + futures with blocking std::net + std::thread.

The benchmark is a multiecho server: client connects to the server, sends "Hello, World!" and the server broadcasts the message to all previously connected clients. Thus, n clients will send and receive n^2 messages in total.

  • src/threads.rs is implementation which spawns a thread per each client.
  • src/fut.rs is a single threaded future based implementation.
  • src/bench.rs simulated 3000 clients.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages