fixedpoint.jp


Open Multi-Methods for C++ (2008-01-06)

Open Multi-Methods for C++ という論文で Bjarne Stroustrup 教授とその学生の方々が C++ での Multiple Dispatch の実現について述べています。

内容のうち分かる範囲では

という点が特に価値があると思います。パフォーマンスについて「ABI を変更すれば定数時間で dispatch が可能」と結論しているあたりに本気を感じます。

また、個人的に注目したのは Chinese Remainder Theorem の解を利用した別アプローチに言及している節でしたが、

Despite its elegance, this approach is rather theoretical because it is hard to use for large class hierarchies. The reason is that we need to assign different prime numbers to classes and perform computations on numbers that are bound by the product of these primes. Such product can't into 32-bit integers for only the 9 first primes and into 64-bit integers for only the 15 first primes.

という結果(を真面目に分析しているだけに余計)にそこはかとないユーモアがあるような気がします。


© 2006-2023 fixedpoint.jp