Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
4fb37598
Commit
4fb37598
authored
Jul 03, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: Added a note about the performance of slicing C++ stl containers.
parent
084a25f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
docs/src/userguide/wrapping_CPlusPlus.rst
docs/src/userguide/wrapping_CPlusPlus.rst
+8
-0
No files found.
docs/src/userguide/wrapping_CPlusPlus.rst
View file @
4fb37598
...
@@ -423,6 +423,14 @@ comprehensions). For example, one can write::
...
@@ -423,6 +423,14 @@ comprehensions). For example, one can write::
If the loop target variable is unspecified, an assignment from type
If the loop target variable is unspecified, an assignment from type
``*container.begin()`` is used for :ref:`type inference <compiler-directives>`.
``*container.begin()`` is used for :ref:`type inference <compiler-directives>`.
.. note::
Slicing stl containers is supported,
you can do ``for x in my_vector[:5]: ...`` but unlike pointers slices,
it will create a temporary Python object and iterate over it. Thus
making the iteration very slow. You might want to avoid slicing
C++ containers for performance reasons.
Simplified wrapping with default constructor
Simplified wrapping with default constructor
--------------------------------------------
--------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment