View decode_simd.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "system" fn decodeSimdNative( | |
_env: JNIEnv, | |
_class: JClass, | |
input: *const u8, | |
input_size: usize, | |
output: *mut u8, | |
output_size: usize, | |
) -> usize { | |
let (input_slice, output_slice) = unsafe { |
View decode_slice3.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "system" fn decodeConfigSliceUrlSafe3( | |
_env: JNIEnv, | |
_class: JClass, | |
input: *const u8, | |
input_size: usize, | |
output: *mut u8, | |
output_size: usize, | |
) -> usize { | |
let (input_slice, output_slice) = unsafe { |
View decode_slice2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "system" fn decodeConfigSliceUrlSafe2( | |
env: JNIEnv, | |
_class: JClass, | |
payload: jbyteArray, | |
size: usize, | |
output: *mut u8, | |
output_size: usize, | |
) -> usize { | |
let arr = env.get_byte_array_elements( |
View decode_slice1.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "system" fn decodeConfigSliceUrlSafe1( | |
env: JNIEnv, | |
_class: JClass, | |
payload: jbyteArray, | |
size: usize, | |
) -> jbyteArray { | |
let mut buffer = Vec::<u8>::with_capacity(size * 3 / 4); | |
let arr = env.get_byte_array_elements( | |
payload, |
View decode4.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub extern "system" fn decodeConfigUrlSafe4( | |
env: JNIEnv, | |
_class: JClass, | |
payload: jbyteArray, | |
size: usize, | |
) -> jbyteArray { | |
let arr = env.get_primitive_array_critical( | |
payload, | |
ReleaseMode::NoCopyBack, | |
).unwrap(); |
View decode3.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "system" fn decodeConfigUrlSafe3( | |
env: JNIEnv, | |
_class: JClass, | |
payload: jbyteArray, | |
size: usize, | |
) -> jbyteArray { | |
let arr = env.get_byte_array_elements( | |
payload, | |
ReleaseMode::NoCopyBack, |
View decode2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[no_mangle] | |
pub extern "system" fn decodeConfigUrlSafe2( | |
env: JNIEnv, | |
_class: JClass, | |
payload: jbyteArray, | |
) -> jbyteArray { | |
let arr = env.get_byte_array_elements( | |
payload, | |
ReleaseMode::NoCopyBack, | |
).unwrap(); |
View StackTraceDirect.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.IllegalStateException | |
at com.komanov.future.examples.ExceptionDemo$.$anonfun$stackTrace$3(ExceptionDemo.scala:14) | |
at scala.runtime.java8.JFunction1$mcII$sp.apply(JFunction1$mcII$sp.java:23) | |
at scala.util.Success.$anonfun$map$1(Try.scala:255) | |
at scala.util.Success.map(Try.scala:213) | |
at scala.concurrent.Future.$anonfun$map$1(Future.scala:292) | |
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33) | |
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33) | |
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) | |
at com.komanov.future.package$DirectExecutor.execute(package.scala:29) |
View StackTraceGlobal.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.IllegalStateException | |
at com.komanov.future.examples.ExceptionDemo$.$anonfun$stackTrace$3(ExceptionDemo.scala:14) | |
at scala.runtime.java8.JFunction1$mcII$sp.apply(JFunction1$mcII$sp.java:23) | |
at scala.util.Success.$anonfun$map$1(Try.scala:255) | |
at scala.util.Success.map(Try.scala:213) | |
at scala.concurrent.Future.$anonfun$map$1(Future.scala:292) | |
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33) | |
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33) | |
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) | |
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) |
View DirectStackTraceDemo.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stackTrace(implicit ec: ExecutionContext): Any = { | |
Await.result( | |
Future.successful(1) | |
.map(v => v + 1) | |
.flatMap(v => Future.successful(v)) | |
.map { v => | |
new IllegalStateException().printStackTrace() | |
v | |
}, | |
10.seconds |
NewerOlder