|
From: | Ruud van Silfhout |
Subject: | Re: Reverse in std_vector.hh |
Date: | Fri, 08 Sep 2006 21:37:16 +0200 |
User-agent: | Thunderbird 1.5.0.5 (Windows/20060719) |
Han-Wen Nienhuys wrote:
Ruud van Silfhout wrote:Hi,I have made an extension for the reverse function in std_vector.hh. The code suggests to implement template specialisation for reverse vector<int>.On second thought, I have reservations whether this is a useful idea, it adds quite a lot of code, and your memrev function invokes memcpy 3 times on 4 to 10 byte objects. This is unlikely to be more efficient than simply assigning int, double and float objects directly as happens for the default implementation.
Han-Wen/Joe,Thans for the feedback. I agree with you it looks a bit overkill, especially if there are only a few platforms that support memrev.
Just simply forget it. Bye, Ruud
[Prev in Thread] | Current Thread | [Next in Thread] |