This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Performance of the default Node Allocator.
On Wed, 2004-01-14 at 16:29, Stefan Olsson wrote:
> Dhruv Matani wrote:
>
[...]
> Nope, still the same problem. If possible it would be great if you
could
> build using 3.4 since any comparations should be done using the same
> compiler version.
The thing is that I'm on a *__Slow__* dial-up connection, so it would
take a couple of days to get 3.4, so it will take me afew days to do
that ;-)
Mean while, I'm attaching a bare minumum file required. Just see if this
works
> Brgds
>
> /Stefan
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
/*
*
* Copyright (c) 2003
* Dhruv Matani.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. No representations made about the
* suitability of this software for any purpose. It is provided
* "as is" without express or implied warranty.
*/
// Author: Dhruv Matani.
// Date: May 08, 2003.
// email: dhruvbird@yahoo.com
#if !defined __NSTL_ALGORITHM_HPP__
#define __NSTL_ALGORITHM_HPP__
namespace nstd {
template <class t>
inline t absolute (const t& a)
{
return a < 0 ? -a : a;
}
template <class t>
inline bool equal_to_ (const t& arg1, const t& arg2)
{ return std::equal_to<t>() (arg1, arg2); }
template <class t>
inline bool greater_equal_ (const t& arg1, const t& arg2)
{ return std::greater_equal<t> () (arg1, arg2); }
template <class t>
inline bool less_ (const t& arg1, const t& arg2)
{ return std::less<t>() (arg1, arg2); }
template <class t>
inline bool greater_ (const t& arg1, const t& arg2)
{ return std::greater<t>() (arg1, arg2); }
template <class t>
inline bool less_equal_ (const t& arg1, const t& arg2)
{ return std::less_equal<t>() (arg1, arg2); }
template <class t>
inline bool not_equal_to_ (const t& arg1, const t& arg2)
{ return std::not_equal_to<t> () (arg1, arg2); }
}
#endif //__NSTL_ALGORITHM_HPP__