Git Product home page Git Product logo

Comments (6)

cohix avatar cohix commented on May 15, 2024

@venugopv Sure, I'd be happy to provide some benchmarks. What kinds of things are you looking to see?

from reactr.

venugopv avatar venugopv commented on May 15, 2024

Hi @cohix , Thanks for quick response. Basically our use case involves many interactions from WASM module (Guest side) to wasm embedder (Host side) to access Host functions (like HTTP functionality. Suborbital::http is exact match to us). Coupling the fact that we would be running 100 of wasm instances in parallel.

So some thing like this: We would be running 100 of instances of similar to Fetch sample (https://github.com/suborbital/reactr/blob/main/rwasm/testdata/fetch/src/lib.rs). From my limited research on CGO, I am under the impression, there would be significant performance penalty. I am interested to know what do you see when you run some thing similar to above (i.e running 100 of instances of similar to Fetch sample ).

from reactr.

cohix avatar cohix commented on May 15, 2024

@venugopv thanks for the detail. I will spend some time this week creating something to demo performance for your use-case. In the meantime, please do explore the docs and examples and let me know if there is anything missing that I can add!

from reactr.

cohix avatar cohix commented on May 15, 2024

Alright so I've run some tests locally, and assuming these results are what you're looking for, I'll push the benchmarks to main so you can try it yourself. If this isn't what you're looking for, let me know and I'll do another round.

BenchmarkRunnableFetch-16 10 120235191 ns/op 107026 B/op 257 allocs/op

That benchmark is just http::get'ing the Google homepage. The ns/op translates to 0.120 seconds/op.

When I do 10 invocations of cURL on the same URL, I get a mean request time of 0.116 seconds.

So average of 120ms per request for Reactr and 116ms per request for cURL. Not a perfect comparison for sure, but it's at least a basic look.

@venugopv Let me know if you'd like to see anything else!

from reactr.

cohix avatar cohix commented on May 15, 2024

@venugopv Any update here?

from reactr.

venugopv avatar venugopv commented on May 15, 2024

Hi @cohix , Thanks very much for your inputs. We have further evaluated on usage of CGO and golang particular, we have decided to embed Webassembly in Rust as it suits more to our use case.

from reactr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.