magine
V2EX  ›  问与答

存储多个 url 只做查询用,是使用平衡二叉树好还是使用字典树好?

  •  
  •   magine · Oct 1, 2014 · 4005 views
    This topic created in 4431 days ago, the information mentioned may be changed or developed.
    Supplement 1  ·  Oct 1, 2014
    写在路由器上的应用,不使用c语言以外的解决方案。
    极度重视查询效率,因为如果效率不高会出现丢包。
    9 replies  •  2014-10-01 18:35:59 +08:00
    Automan
    Automan
    Oct 1, 2014❤️1
    1
    hash
    zhouquanbest
    zhouquanbest
    Oct 1, 2014
    2
    hash+1
    daweibao
    daweibao
    Oct 1, 2014
    3
    hash+1
    virusdefender
    virusdefender
    Oct 1, 2014
    4
    你是多少条url,直接放数据库~
    iloahz
    iloahz
    Oct 1, 2014 via iPhone❤️1
    5
    效率肯定字典树了,不过方便还是平衡树,直接上map。
    ls的hash也是非常靠谱的
    magine
    magine
    OP
    Oct 1, 2014
    6
    @virusdefender
    环境需求,不能使用数据库。
    hitigon
    hitigon
    Oct 1, 2014
    7
    字典树吧
    c742435
    c742435
    Oct 1, 2014
    8
    多个是多少个。
    1000个和百万个还是有很大区别的
    magine
    magine
    OP
    Oct 1, 2014
    9
    @c742435
    1000个左右。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4375 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 01:10 · PVG 09:10 · LAX 17:10 · JFK 20:10
    ♥ Do have faith in what you're doing.