Skip to content

Commit

Permalink
Improve performance on struct.unpack (IronLanguages#1817)
Browse files Browse the repository at this point in the history
* Improve performance on struct

* Fix some struct issues

* Remove array overloads

* Clean up unpack_iterator

* Fix packaging on .NET 9 SDK
  • Loading branch information
slozier authored Nov 25, 2024
1 parent 74ba84d commit 94565b4
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 170 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@

<!-- Release -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols>false</DebugSymbols>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
Expand Down
4 changes: 0 additions & 4 deletions Src/IronPython.Modules/_ctypes/_ctypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,6 @@ private static IntPtr GetHandleFromObject(object dll, string errorMsg) {
return intPtrHandle;
}

private static void ValidateArraySizes(ArrayModule.array array, int offset, int size) {
ValidateArraySizes(array.__len__() * array.itemsize, offset, size);
}

private static void ValidateArraySizes(int arraySize, int offset, int size) {
if (offset < 0) {
throw PythonOps.ValueError("offset cannot be negative");
Expand Down
Loading

0 comments on commit 94565b4

Please sign in to comment.