masstronaut / ftl Goto Github PK
View Code? Open in Web Editor NEWFast Template Library: A library containing implementations of various template classes and utilities with an emphasis on performance.
Fast Template Library: A library containing implementations of various template classes and utilities with an emphasis on performance.
Currently a couple parts of the std::vector interface are not available on ftl::vector.
These should be implemented to provide full drop-in compatibility.
The current implementation of ftl::vector::~vector() uses delete[] to free memory.
It should be updated to use m_alloc.deallocate(m_begin, m_capacity) or equivalent.
Inline vectors do something similar to the small string optimization (SSO) by allocating an internal buffer capable of holding N elements, where N is specified as a template parameter. The inline vector should type erase to the underlying vector type.
Currently ftl::default_allocator is implemented inside vector.hpp. This isn't a 2-way dependency, and so the allocator should be moved out into it's own header and included from vector if necessary.
This vector should be able to provide O(1) erase operations by no longer guaranteeing the ordering of the elements in the container after an erase operation is completed, usually by overwriting it with elements from the back of the vector.
Even with a C++14 compliant compiler version (g++-5) the code still compiles with errors.
The implementation of allocate and deallocate should not use the new[] and delete[] operators as they are standardly used for allocation/deallocation + construction/destruction, although they are used to create a char[]. This should be substituted for operator new and operator delete functions which solely allocates and deallocates memory.
More Info:
operator new, operator new[]: http://en.cppreference.com/w/cpp/memory/new/operator_new
operator delete, operator delete[]: http://en.cppreference.com/w/cpp/memory/new/operator_delete
Types without a copy constructor cause ftl::vector to fail to be instantiated.
When moving from an inline_vector, the inline storage buffer continues to be used. If the inline vector leaves scope before the vector being constructed, the inline buffer will also leave scope and be released while the original vector may still hold references to that memory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.