| От | Oliver Jowett |
|---|---|
| Тема | Re: Use of instanceOf |
| Дата | |
| Msg-id | 40281919.2070900@opencloud.com обсуждение исходный текст |
| Ответ на | Use of instanceOf (Dave Cramer <pg@fastcrypt.com>) |
| Список | pgsql-jdbc |
Dave Cramer wrote: > While reading the source code, I noticed we use instanceOf *alot* this > is (used to be ? ) a fairly expensive operation. Does anyone know the > state of the current technology, and what the cost of instanceof really > is? instanceof is cheap in comparison to the other work the driver does. I wouldn't worry about it unless you have some benchmarks that point to it as a real bottleneck. > Then I guess the next question is how to refactor the instanceof out? The main user is setObject() and friends. We can't avoid an instanceof or getClass() in this case -- we need to know the runtime type of the object to do anything sensible with it. -O
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера