Comments (5)
Agree. Internally there are already a de-serialization, but uint64 values are not available to user.
Probably we can count some very fast hash on those values (or just sum them up?) on all values to force de-serialization?
Not sure how to deal with it in general.
from ch-bench.
I think we probably should avoid extra calculation, which might be unfair for programming languages like Java and Python :p i guess it's sufficient enough to call driver-specific method to make sure bytes were converted to uint64, either explicitly or implicitly. For Java, below snippets will do the work.
from ch-bench.
AFAIK ch-bench-official is doing it implicitly here:
https://github.com/go-faster/ch-bench/blob/c2627b1d0fa1a8abc7d3560816d3b919b983600b/ch-bench-official/main.go#L30-L33
Same as uptrace:
https://github.com/go-faster/ch-bench/blob/c2627b1d0fa1a8abc7d3560816d3b919b983600b/ch-bench-uptrace/main.go#L24-L28
Personally I would prefer something like that:
var count int
for rows.Next() {
var value uint64
if err := rows.Scan(&value); err != nil {
return err
}
count++
}
But this will dramatically increase time from 1.388s to 22.567s which is unfortunate (but actually more realistic). This would not affect ch-go and chconn, because they don't rely on reflection.
WDYT?
from ch-bench.
Thanks @ernado. It looks like rows.Next()
is mainly about reading blocks according to here, while rows.Scan
is the deserialization we're talking about - see here.
Yes, I think the change is more accurate although it will increase the time - perhaps the author has better idea.
By the way, I think besides UInt64, we probably should also consider other data types like String, DateTime and Array(Java is extremely slow for processing nested types) etc.. Below is something I tried earlier but never got enough time to fill out all those tiny cells :p
from ch-bench.
we probably should also consider other data types like String, DateTime and Array
never got enough time to fill out all those tiny cells :p
I've tried to do it, but with same result - never got enough time :D
from ch-bench.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ch-bench.