Hibernate implementation. Are we paying the reflection penalty?

后端 未结 5 1972
栀梦
栀梦 2021-01-06 01:51

Long time ago, I was creating a mini ORM using reflection.

While reading about reflection I got a similar answer like this:

Java Reflection Performance

5条回答
  •  心在旅途
    2021-01-06 02:09

    The cost of persistence and retrieval is many times the cost of reflection. To access a record from a DB might take 1-10 ms and to construct an object with reflection might take 0.001 to 0.01 ms.

提交回复
热议问题