FastAPI vs Ray FastAPI performance

We compared a hello world endpoint in ray with fastAPI and fastAPI and learned that fastAPI alone seems to be much faster.

from fastapi import FastAPI


app = FastAPI()

class MyFastAPIDeployment:
    @app.get("/")
    async def root():
        return "Hello, world!"

import time
import ray
import requests
from fastapi import FastAPI
from ray import serve

app = FastAPI()


@serve.deployment(max_ongoing_requests=1000)
@serve.ingress(app)
class MyFastAPIDeployment:
    @app.get("/")
    async def root(self):
        return "Hello, world!"

serve_options = { "host" : "0.0.0.0"}
serve.start(http_options=serve_options)

# 2: Deploy the application locally.
app1 = MyFastAPIDeployment.bind()
serve.run(app1, route_prefix="/")

Standalone FastAPI was factor 10+ faster. Is there anything we do wrongly?
We used fastapi run and serve build and run commands and benchmarked the http endpoint with hey.

Thank you!

This sounds quite similar to what I am facing. Ray Serve with FastAPI slowing down performance - Ray Libraries (Data, Train, Tune, Serve) / Ray Serve - Ray
I will provide a reproducible sample

I also created a bug for this
Ray Serve with Fastapi is a lot (10x) slower than plain fastapi · Issue #46693 · ray-project/ray (github.com)

got resolved in Github. My expectations were wrong.