• Cyrill Schumacher's avatar
    database/sql: convertAssign string and time.Time into RawBytes · 3487c4e0
    Cyrill Schumacher authored
    A new switch case for converting the source string type into a
    destination RawBytes type avoids the reflection based conversion.
    Speed up from old ~61.7ns/op down to ~49ns/op.
    
    A second new switch case allows to convert and assign a source time.Time
    type into a destination sql.RawBytes type. This switch case appends
    the time to the reset RawBytes slice. This allows the reuse of RawBytes
    and avoids allocations.
    
    Fixes #20746
    
    Change-Id: Ib0563fd5c5c7cb6d9d0acaa1d9aa7b2927f1329c
    Reviewed-on: https://go-review.googlesource.com/66830
    Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDaniel Theophanes <kardianos@gmail.com>
    3487c4e0
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...