[Development] [BB++] Now is 3.5x faster than Node.JS

Phil Bouchard philippeb8 at gmail.com
Thu Jul 27 03:15:30 CEST 2017


On 07/25/2017 08:11 AM, Phil Bouchard wrote:
>
> I didn't have a chance to create documentation yesterday but I will this
> week.

I just created a more complex example and it seems to be running 
perfectly fine:

class Document
{
     auto head = nullptr<Document>();
     auto tail = nullptr<Document>();

     Document() { cout << __PRETTY_FUNCTION__ << endl; }
     ~Document() { cout << __PRETTY_FUNCTION__ << endl; }

     auto foo = function (int argument) { cout << __PRETTY_FUNCTION__ << 
endl; return argument; };
};

int main()
{
     auto temporary = 1;

     auto document = new Document();
     document.foo(temporary);

     auto bar = function ()
     {
         auto document = new Document();

         // cycle
         document.head = new Document();
         document.head.head = new Document();
         document.head.head.head = document;

         return document;
     };

     cout << 1 << endl;
     auto result = bar().foo(temporary);
     cout << 2 << endl;
}


Outputs:

Document::Document(const boost::node_proxy&)
auto __lambda0(boost::node_proxy&, int)
1
Document::Document(const boost::node_proxy&)
Document::Document(const boost::node_proxy&)
Document::Document(const boost::node_proxy&)
Document::~Document()
Document::~Document()
auto __lambda0(boost::node_proxy&, int)
2
Document::~Document()
Document::~Document()


-Phil




More information about the Development mailing list