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
@IBAction func shapingToy(_: Any) { | |
print("shaping toy start") | |
//let text = "hello 😀 العالمية" | |
let text = "hello this is a pretty long string that's designed to see what the effect on shaping is. Probably it's not something we need to worry about" | |
let font = NSFont(name: "Inconsolata", size: 14)! | |
let attributes: [NSAttributedStringKey: AnyObject] = [ | |
NSAttributedStringKey.font: font, | |
] | |
let attrString = NSMutableAttributedString(string: text, attributes: attributes) | |
// benchmark time! |
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
// Copyright 2017 Google LLC. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
{"method":"update","params":{"update":{"ops":[{"n":6374,"op":"invalidate"},{"n":18,"op":"invalidate"},{"n":87,"op":"invalidate"},{"n":101,"op":"invalidate"},{"n":6580,"op":"skip"},{"n":56,"op":"copy"},{"n":63,"op":"invalidate"},{"n":63,"op":"skip"},{"n":56,"op":"copy"},{"n":61,"op":"invalidate"},{"n":61,"op":"skip"},{"n":56,"op":"copy"},{"n":59,"op":"invalidate"},{"n":59,"op":"skip"},{"n":56,"op":"copy"},{"n":57,"op":"invalidate"},{"n":57,"op":"skip"},{"n":56,"op":"copy"},{"n":55,"op":"invalidate"},{"n":55,"op":"skip"},{"n":56,"op":"copy"},{"n":53,"op":"invalidate"},{"n":53,"op":"skip"},{"n":56,"op":"copy"},{"n":52,"op":"invalidate"},{"n":52,"op":"skip"},{"n":56,"op":"copy"},{"n":49,"op":"invalidate"},{"lines":[{"styles":[0,1,3,0,5,5,0,6,3,0,1,4,0,1,3,0,7,6,0,2,3],"text":"\tinput.type = \"radio\";\n"},{"styles":[0,1,3,0,7,5,0,12,3,0,1,4,0,1,3,0,5,5,0,7,3,0,3,4,0,1,3,0,3,6,0,2,3],"text":"\tsupport.radioValue = input.value === \"t\";\n"},{"styles":[0,7,3],"text":"} )();\n"},{"styles":[0,1,3],"text":"\n"},{"styl |
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
// Copyright 2017 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
// Copyright 2017 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
// Copyright 2017 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// https://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
// Copyright 2018 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
#![feature(test)] | |
extern crate test; | |
// Note: this dependency is nightly only | |
extern crate packed_simd; | |
#[macro_use] | |
extern crate cfg_if; |
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
struct Key(Arc<()>); | |
impl Key { | |
pub fn new() { | |
Key(Arc::new(())) | |
} | |
} | |
// Note: Key is not Clone, there can be only one. |
OlderNewer