aalmada / spansample Goto Github PK
View Code? Open in Web Editor NEWCompanion code for my article on Span<T> and Memory<T>
Home Page: https://medium.com/@antao.almada/how-to-use-span-t-and-memory-t-c0b126aae652
License: The Unlicense
Companion code for my article on Span<T> and Memory<T>
Home Page: https://medium.com/@antao.almada/how-to-use-span-t-and-memory-t-c0b126aae652
License: The Unlicense
Hello,
I saw in your excellent blog post the use of the benchmarks here. When checking out the code, however, there seems to be a NativeEnumerable
benchmark that is not discussed in the blog post. Not that I can see, at least.
This. of course, gets me curious to download the code and try it out to see how it fares with the others. Unfortunately, it results in an exception which I will provide here:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at SpanSample.Native.StreamRead(NativeStreamHandle stream, Int32& buffer, UIntPtr size)
at SpanSample.NativeEnumerable.Enumerator.MoveNext() in C:\Users\..\Downloads\SpanSample-master\SpanSample\NativeEnumerable.cs:line 54
at SpanSample.EnumerationBenchmarks.NativeEnumerable() in C:\Users\..\Downloads\SpanSample-master\SpanSample\EnumerationBenchmarks.cs:line 156
at BenchmarkDotNet.Autogenerated.Runnable_0.WorkloadActionNoUnroll(Int64 invokeCount) in C:\Users\..\Downloads\SpanSample-master\SpanSample\bin\Release\netcoreapp2.1\bded5edd-b23b-45eb-8855-ac509f2a26ce\bded5edd-b23b-45eb-8855-ac509f2a26ce.notcs:line 466
at BenchmarkDotNet.Engines.Engine.RunIteration(IterationData data)
at BenchmarkDotNet.Engines.EngineFactory.Jit(Engine engine, Int32 jitIndex, Int32 invokeCount, Int32 unrollFactor)
at BenchmarkDotNet.Engines.EngineFactory.CreateReadyToRun(EngineParameters engineParameters)
at BenchmarkDotNet.Autogenerated.Runnable_0.Run(IHost host) in C:\Users\..\Downloads\SpanSample-master\SpanSample\bin\Release\netcoreapp2.1\bded5edd-b23b-45eb-8855-ac509f2a26ce\bded5edd-b23b-45eb-8855-ac509f2a26ce.notcs:line 143
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) in C:\Users\..\Downloads\SpanSample-master\SpanSample\bin\Release\netcoreapp2.1\bded5edd-b23b-45eb-8855-ac509f2a26ce\bded5edd-b23b-45eb-8855-ac509f2a26ce.notcs:line 59
A couple other notes:
Otherwise, this is extremely valuable and informative. Thank you for putting this together!
-Michael
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.