Jo

Results 65 comments of Jo

我觉得这样比较是没有问题的。 因为在我们的测试场景中,是先在代码中写好一个 double literal, 比如 `double d = 3.14159;`,但是编译器在处理源代码时,仍然是需要用某种方式,将我们代码中的 `3.14159` 这个`字符串`转换成二进制形式的浮点数表示,这种转换方式很可能就是 `strtod`。 另一方面,我们又写了一个 string litral, `char* s = "3.14159"`,编译器先将它以字符数组的形式保存,然后我们将这个字符数组传给我们的`lept_parse_number`函数,最终传给 `strtod`函数,`strtod` 对其做解析,返回一个 double。 所以说,在一个测试用例中,只是一个同样的字符串经过了两次 `strtod` 的操作而已,他们的结果当然会相同。因此,直接用 `==` 判断是没有问题的。 为了验证我的判断,我写了一小段代码: ```c #include...

此问题与 #21 相同, 因为解析数字的时候一般设计成尽可能多的转换合法字符(例如标准库中的`strtod()`), 而不是遇到一个不合法字符就抛出错误. 所以 `112a.0` 的解析结果是 `112`, 同时也会返回 `LEPT_PARSE_ROOT_NOT_SINGULAR` 错误.

Hi, thanks for your comment! I'm sorry for submitting an important change without making any notes. In fact, I really wanted to explain something, but my English is so poor...

Here are some benchmark results ran in my local machine: goos: darwin goarch: amd64 cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Most numbers are fine, except for `RedisAddPresence_1Ch`, `RedisPresence_1Ch` and...

After fixed the `redis.Nil` problem, here is the updated benchmark results about `RedisPresence`: ``` name old time/op new time/op delta RedisAddPresence_1Ch-12 16.2µs ± 2% 16.6µs ±12% ~ (p=0.690 n=5+5) name...

> Sorry, I mean performance comparison in Redis Cluster case, updated the comment :) Will do it 😄 But I want to figure out why the `BenchmarkRedisSurvey` hang when running...

> Is it hanging for both redigo and go-redis on your machine? That's right. Seems like there *is* something wrong with my setup.

@FZambia Hi, have you tried run the benchamrk multiple times? like `go test -tags integration -bench=BenchmarkRedisSurvey/100_nodes -run=NONE -count=5`. In my case, it always hang in the second or third run.

Latest benchstat results against the master branch(including cluster mode stats): ``` name old time/op new time/op delta RedisExtractPushData-16 71.9ns ± 1% 32.0ns ± 1% -55.50% (p=0.008 n=5+5) RedisSurvey/1_node_512B-16 1.57µs ±...

With this patch, I was able to runthis benchmark successfully on my windows desktop (have to manually increase the redis `maxclients` configuration). But sadly it still doesn't work on my...