simhash icon indicating copy to clipboard operation
simhash copied to clipboard

为什么与一个python版计算出来的结果不一样?

Open deepzliu opened this issue 7 years ago • 5 comments

您好,python版: https://github.com/leonsim/simhash, 用的就是本代码中的那段文字。

deepzliu avatar Jun 13 '17 23:06 deepzliu

计算速度要慢很多,是因为有词法分析器吗?

deepzliu avatar Jun 13 '17 23:06 deepzliu

  1. 计算出来的结果不一样是很正常的,你可以看一下simhash的原理就知道了。
  2. c++的程序速度比python的快也是符合预期的。

yanyiwu avatar Jun 14 '17 01:06 yanyiwu

2.是您这个版本比python那个版本慢很多。当然我只是简单的测试了下。

deepzliu avatar Jun 14 '17 05:06 deepzliu

你测试是把加载词典也算进去了吧,那当然慢了。

发自我的 iPhone

在 2017年6月14日,13:42,Donghua Lau [email protected] 写道:

2.是您这个版本比python那个版本慢很多。当然我只是简单的测试了下。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

yanyiwu avatar Jun 14 '17 05:06 yanyiwu

This issue has not been updated for over 5 years and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.

github-actions[bot] avatar Sep 07 '24 13:09 github-actions[bot]

This issue has been automatically closed due to inactivity. If the issue still exists, please reopen it.

github-actions[bot] avatar Sep 20 '24 13:09 github-actions[bot]