This repository has been archived by the owner on Apr 2, 2021. It is now read-only.
Consider the use of defer #23
Labels
code style
about code style
enhancement
New feature or request
level:expert
issues that requires expert knowledge
Projects
Milestone
Description
Since this project aims to be a fast in memory database, it is better to eliminate the use of defer.
defer
is nice for code readability where theOpen
andClose
operations are close to each other and prevents to from forgetting toClose()
but it has a performance penalty.Steps to reproduce the behavior:
Expected behavior
OS and Other informations
Additional details
See: https://bytes-and-bites.com/posts/defer-go-performance/
The text was updated successfully, but these errors were encountered: