Skip to content

HttpClient vs RestSharp Benchmark #2086

@ngoquoctoandev

Description

@ngoquoctoandev

I reused the following code for a simple review. https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/dotnet-client-libraries/HttpClientVsRestSharp/HttpClientVsRestSharp
The source code in the review I have upgraded all packages to the latest version, .NET 7, hardware information as attached image below.

My performance analysis shows that both libraries are similar in time performance. However, HttpClient performs better regarding memory allocation. Is there a way to make this library even better while keeping the same performance as HttpClient.

image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-infoNot enough information provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions