jamescourtney / FlatSharp

Fast, idiomatic C# implementation of Flatbuffers
Apache License 2.0
497 stars 50 forks source link

VTable Optimizations #265

Closed jamescourtney closed 2 years ago

jamescourtney commented 2 years ago

Collectively, this means that usage of the new methods is the same, but for best performance, those with custom IInputBuffer implementations should either implement IInputBuffer2 or provide implementations for the new methods.

codecov[bot] commented 2 years ago

Codecov Report

Merging #265 (0d8adf7) into main (dde473d) will increase coverage by 0.21%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
+ Coverage   95.46%   95.67%   +0.21%     
==========================================
  Files         109      119      +10     
  Lines        7272     7633     +361     
  Branches      680      705      +25     
==========================================
+ Hits         6942     7303     +361     
  Misses        230      230              
  Partials      100      100              
Impacted Files Coverage Δ
src/FlatSharp/TypeModel/ItemMemberModel.cs 90.54% <ø> (ø)
src/FlatSharp/TypeModel/StructMemberModel.cs 80.64% <ø> (ø)
src/FlatSharp.Compiler/SchemaModel/RootModel.cs 100.00% <100.00%> (ø)
src/FlatSharp.Runtime/IO/InputBufferExtensions.cs 95.65% <100.00%> (ø)
src/FlatSharp.Runtime/VTables/VTable0.cs 100.00% <100.00%> (ø)
src/FlatSharp.Runtime/VTables/VTable1.cs 100.00% <100.00%> (ø)
src/FlatSharp.Runtime/VTables/VTable2.cs 100.00% <100.00%> (ø)
src/FlatSharp.Runtime/VTables/VTable3.cs 100.00% <100.00%> (ø)
src/FlatSharp.Runtime/VTables/VTable4.cs 100.00% <100.00%> (ø)
src/FlatSharp.Runtime/VTables/VTable5.cs 100.00% <100.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dde473d...0d8adf7. Read the comment docs.

jamescourtney commented 2 years ago

Increases complexity without any meaningful impact on perf. Leaving branch as-is. Will consider IInputBuffer changes separately.

jamescourtney commented 2 years ago

Found a case where this does help.