多职位 [英] Multi-post
本文介绍了多职位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不解为什么它会在wndproc中使用顺序搜索来搜索msg的处理程序(使用swtich..case ..语句).至少它应该使用二进制搜索来提高效率,不是吗?顺序搜索的时间复杂度为O(n),二进制搜索的时间复杂度为O(logn).它们的效率随着"n"的增加而大不相同.
以及搜索地址.
i''m puzzled why it uses sequential search in wndproc to search the handler of a msg.(use swtich..case.. statement). at least, it should use binary search for efficiency, doesn''t it? sequential search''s time-complexity is O(n), and binary search''s is O(logn). they''re quite different in efficiency along with the increase of ''n''.
as well as search the addr. of a function in virtual-table at runtime polymorphic.
推荐答案
您现在已经在C论坛和此处的快速解答中将此问题作为文章发布了.已经至少回答了两次.请仅在一个论坛中发帖.
You have now posted this question as an article, in the C forum and here in quick answers. It has already been answered at least twice. Please post in one forum only.
这篇关于多职位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文